Hi
Zbigniew Szalbot escreveu:
> Hello,
>
> We have an sql database of users who we would like to contact from
> time to time. So far we have been doing it outside of mailman realm. I
> would like to sync the sql user database to a mailing list and then
> send them a newsletter. The primary reason for this is that manual
> bounce management is quite a tedious process.
>
> Is there a way to sync the database in such a way as to only update
> records rather than delete all users from mailman and import them from
> scratch?
Yes, using /home/mailman/bin/sync_members
> And what if a given record has been deleted in the sql
> database? Will it also be deleted from mailman user database upon
> importing/syncing?
>
Yes.
I use a script to sync a lot of my lists
#!/bin/bash
#script to sync a mailing list named mailing_list
Data=`/bin/date +"%Y_%m_%d %T"`
day=`/bin/date +"%Y_%m_%d"`
hour=`/bin/date +"%H%M"`
LOGFILE="/home/admin/scripts_mailing_lists/$day""_mailing_list_sync.log"
nomefich="/home/admin/scripts_mailing_lists/$day""_mailing_list.log"
your_mysql_querie_goes here >$nomefich
#only sync if data were obtained to prevent conectivity losses because
in our case the mysql server
# is a remote server
if [ `cat $nomefich | wc -l` > 0 ]; then
/home/mailman/bin/sync_members -w=no -g=no -a=no -f $nomefich
mailing_list >$LOGFILE
fi
> Many thanks!
>
>
--
===============================|===================================
= Joao Sa Marta | Email: [EMAIL PROTECTED] =
= Centro de Informatica | Tel: 239 853178 (directo) =
= da Universidade de | Tel: 239 853170 (Geral) =
= Coimbra | Fax: 239 853189 =
= Apartado 3080 | http://www.uc.pt/pessoal/samarta =
= 3001-401 Coimbra | =
===============================|===================================
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp