[Mailman-Users] Modifying Mailman-generated virtuals file

Mark Sapiro msapiro at value.net
Fri Oct 14 20:32:11 CEST 2005

Philip M. White wrote:
>I think there is confusion here.  Originally, my virtuals file looks
>cs1234 at list.qnan.org              cs1234

Yes, I didn't look carefully enough at the code the first time. I see
it now.

The only way to fix this so the entries look like

cs1234 at list.qnan.org              cs1234 at localhost

is to patch Mailman/MTA/Postfix.py similarly to:

--- Postfix.py  2003-03-31 13:49:43.000000000 -0800
+++ localPostfix.py     2005-10-14 11:09:02.468750000 -0700
@@ -146,8 +146,9 @@
     # Now add all the standard alias entries
     for k, v in makealiases(listname):
         fqdnaddr = '%s@%s' % (k, hostname)
+        localaddr = '%s at localhost' % k
         # Format the text file nicely
-        print >> fp, fqdnaddr, ((fieldsz - len(k)) * ' '), k
+        print >> fp, fqdnaddr, ((fieldsz - len(k)) * ' '), localaddr
     # Finish the text file stanza
     print >> fp, '# STANZA END:', listname
     print >> fp

As I said in my previous post:

> You can do this 'cleanly' by storing the modified version as (e.g.)
> Mailman/MTA/localPostfix.py and then putting MTA = 'localPostfix' in
> mm_cfg.py. In this way, your modified version will not be overwritten
> when Mailman is upgraded.

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list