[Mailman-Users] Keeping subscription info in sync across servers

John Locke mail at freelock.com
Mon Feb 10 19:15:56 CET 2003

On Mon, 2003-02-10 at 08:53, Morgan Jones wrote:

> Attempting to keep mailman's backend text files synced between servers
> is sure to prove tricky..  I don't believe mailman has any built-in
> redundancy.

I don't think it's all that tricky, especially for 1 way.
> On Mon, Feb 10, 2003 at 04:41:32PM +0000, Ian Chilton wrote:
> | 
> | I was wondering if there was an easy way to keep subscription info in
> | sync across multiple list servers.
> | 
> | What I want to do is setup a backup list server which will still
> | deliver list mail if the main box is down. So, I only need a single way
> | replication, i.e all changes are made on the main server and the 2nd
> | server just has to stay in sync.
> | 
> | I was thinking an easy way to do this would be to have a function in
> | mailman which made it automatically sent an e-mail or made a socket
> | connection to the other server when any options or subscriptions were
> | changed.
> | 

I'm sure you could dig around in Mailman to find a place to hook some
sort of trigger for a script, and the people on Mailman-Developers can
certainly help you find it.

Much easier is to write a simple script that runs from cron. Could be as
simple as:

/usr/local/mailman/bin/list_members listname | mail -s "listname update"
update at otherserver.com

Then, on the other server, set up an email address that dumps the
message to another script. This script (in the language of your choice)
should parse the message to make sure it comes from the other server
(don't want people from anywhere else screwing with your membership
list!), extracts the body of the message, and pipes it to
/usr/local/mailman/bin/sync_members listname (or wherever your
environment is).

You can also set up a web service to do basically the same thing, though
the email route might be a little more reliable (because MTAs usually
manage to deliver the message, even if the connection is out for a
while.) If you're looking for a chance to learn about web services, it
would be a great sample project.

Lots of ways to make this more sophisticated, if you need to keep track
of who's on digest, etc.

Hope that helps...

John Locke
Owner, Freelock, LLC
Just launched: http://teamcheckin.com

More information about the Mailman-Users mailing list