[Mailman-Users] Having mailman treat two domains as equal during migration...

Mike Cisar mlists at starmania.net
Fri Oct 28 17:30:57 CEST 2005

I have a corporate customer who is in the process of migrating all of their
users and services from one domain to another (lets say
reallyreallyreallylongandhardolddomain.com to newdomain.com).  Because they
are quite large, and not centralized they estimate that it will be about a
month before they are able to get out to all the remote sites to convert the
user mail settings to the new domain.  They use mailman for much internal
mailing between various groups of their users.

At this point the mail server is configured to respond to both domains, and
treat them as the same.  Mailman itself is configured to use the new domain
both on the web side, and all the lists have been changed to use that as
their preferred domain.  However the problem arises with the list
subscribers themselves.  We can't simply export the membership for the lists
and change everyone to the new domain because everyone won't be sending with
the new addresses at once.  In the worst case scenario we could export the
list make the changes and reimport with nomail set so that everyone has a
duplicate membership, and then remove the old domain accounts once the
conversion is complete.  I'd prefer to save this as a last resort at this
point as it is kind of messy.

What I would like to do is do a one-shot conversion of all the users to the
new domain name and then internally to mailman, when the message is first
submitted into the mailman process simply have a regex replacement of the
sender's domain name so even though the message might actually be coming
from joeblow at olddomain.com mailman would read that in, do a quick replace in
its mind and for the rest of the process treat the message as if it had come
from joeblow at newdomain.com 

I am assuming that this should pretty much be a 'one-liner' code
modification to mailman.   Pardon my Perl (I'm not a native Pythoner so that
doesn't help matters :-) but the equivalent of "sender =~
s/olddomain/newdomain/" immediately after mailman parses 'sender' from the
incoming message.  I don't really grok how the message flows through the
internals of Mailman... so the couple of places I've tried putting the
'one-liner' don't seem to have any effect.  I'm assuming that this should be
done literally as soon as possible after Mailman has received the message
from the MTA to ensure that the substitution is used in all possible

I'm hoping someone on the list may be able to tell me if this a) is really a
one-liner and b) roughly where to look at inserting the 'one-liner' in order
to acchieve the required result.  

Thanks for your help!

>>>>> Mike <<<<<

More information about the Mailman-Users mailing list