[Mailman-Developers] Postfix.py extension for virtual_domain management

Mike Gabriel mgabriel at ecology.uni-kiel.de
Fri Jan 21 23:33:39 CET 2005

hi there,

i have newly subscribed to the list as i want to propose an alternative 
(extended) postfix MTA backend. i called it PostfixVirtual.py as a working 

it enables an extended support for postfix virtual domains. all this can also 
be achieved by manually adding some aliases in postfix's /etc/aliases 
manually, but why not manage all of the following automagically:

enable one and the same list on all configured virtual domains (e.g. 
gurus at ...)

create a list: "all_virtualdomains.gurus"

this will lead to an alias stanza in the virtual-mailman map:

# STANZA START: all_virtualdomains.gurus
# CREATED: Fri Jan 21 22:00:02 2005
gurus at dom1.com             all_virtualdomains.gurus
gurus at dom2.com             all_virtualdomains.gurus
gurus at dom3.org             all_virtualdomains.gurus
gurus-admin at dom1.com       all_virtualdomains.gurus-admin
gurus-admin at dom2.com       all_virtualdomains.gurus-admin
gurus-admin at dom3.org       all_virtualdomains.gurus-admin
gurus-bounces at dom1.com     all_virtualdomains.gurus-bounces
gurus-bounces at dom2.com     all_virtualdomains.gurus-bounces
gurus-bounces at dom3.org     all_virtualdomains.gurus-bounces
gurus-confirm at dom1.com     all_virtualdomains.gurus-confirm
gurus-confirm at dom2.com     all_virtualdomains.gurus-confirm
gurus-confirm at dom3.org     all_virtualdomains.gurus-confirm
gurus-join at dom1.com        all_virtualdomains.gurus-join
gurus-join at dom2.com        all_virtualdomains.gurus-join
gurus-join at dom3.org        all_virtualdomains.gurus-join
gurus-leave at dom1.com       all_virtualdomains.gurus-leave
gurus-leave at dom2.com       all_virtualdomains.gurus-leave
gurus-leave at dom3.org       all_virtualdomains.gurus-leave
gurus-owner at dom1.com       all_virtualdomains.gurus-owner
gurus-owner at dom2.com       all_virtualdomains.gurus-owner
gurus-owner at dom3.org       all_virtualdomains.gurus-owner
gurus-request at dom1.com     all_virtualdomains.gurus-request
gurus-request at dom2.com     all_virtualdomains.gurus-request
gurus-request at dom3.org     all_virtualdomains.gurus-request
gurus-subscribe at dom1.com   all_virtualdomains.gurus-subscribe
gurus-subscribe at dom2.com   all_virtualdomains.gurus-subscribe
gurus-subscribe at dom3.org   all_virtualdomains.gurus-subscribe
gurus-unsubscribe at dom1.com all_virtualdomains.gurus-unsubscribe
gurus-unsubscribe at dom2.com all_virtualdomains.gurus-unsubscribe
gurus-unsubscribe at dom3.org all_virtualdomains.gurus-unsubscribe
all_virtualdomains.gurus at dom1.com           all_virtualdomains.gurus
all_virtualdomains.gurus-admin at dom1.com     all_virtualdomains.gurus-admin
all_virtualdomains.gurus-bounces at dom1.com   all_virtualdomains.gurus-bounces
all_virtualdomains.gurus-confirm at dom1.com   all_virtualdomains.gurus-confirm
all_virtualdomains.gurus-join at dom1.com      all_virtualdomains.gurus-join
all_virtualdomains.gurus-leave at dom1.com     all_virtualdomains.gurus-leave
all_virtualdomains.gurus-owner at dom1.com     all_virtualdomains.gurus-owner
all_virtualdomains.gurus-request at dom1.com   all_virtualdomains.gurus-request
all_virtualdomains.gurus-subscribe at dom1.com all_virtualdomains.gurus-subscribe
all_virtualdomains.gurus-unsubscribe at dom1.com 
# STANZA END: all_virtualdomains.gurus

only thing that has to be done to the list is add "gurus" to 

enable very common listnames like members at ..., people at ..., etc. on more than 
one domain, addressing different mailing lists on the same host.

on my server i host two different aikido dojos that have different groups of 
members. what i did is create two lists:

org.aikido1.members at aikido1.org
org.aikido2.members at aikido2.org

only if the front part of the listname matches the virtual_domain (in a 
backward fashion) then the list is treated in a special manner by 

# STANZA START: org.aikido1.members
# CREATED: Fri Jan 21 22:00:02 2005
members at aikido1.org                           org.aikido1.members
members-admin at aikido1.org                     org.aikido1.members-admin
members-bounces at aikido1.org                   org.aikido1.members-bounces
members-confirm at aikido1.org                   org.aikido1.members-confirm
members-join at aikido1.org                      org.aikido1.members-join
members-leave at aikido1.org                     org.aikido1.members-leave
members-owner at aikido1.org                     org.aikido1.members-owner
members-request at aikido1.org                   org.aikido1.members-request
members-subscribe at aikido1.org                 org.aikido1.members-subscribe
members-unsubscribe at aikido1.org               org.aikido1.members-unsubscribe
org.aikido1.members at aikido1.org               org.aikido1.members
org.aikido1.members-admin at aikido1.org         org.aikido1.members-admin
org.aikido1.members-bounces at aikido1.org       org.aikido1.members-bounces
org.aikido1.members-confirm at aikido1.org       org.aikido1.members-confirm
org.aikido1.members-join at aikido1.org          org.aikido1.members-join
org.aikido1.members-leave at aikido1.org         org.aikido1.members-leave
org.aikido1.members-owner at aikido1.org         org.aikido1.members-owner
org.aikido1.members-request at aikido1.org       org.aikido1.members-request
org.aikido1.members-subscribe at aikido1.org     org.aikido1.members-subscribe
org.aikido1.members-unsubscribe at aikido1.org   org.aikido1.members-unsubscribe
# STANZA END: org.aikido1.members

again, you have to add the alias in acceptable_aliases() 
("members at aikido1.org")

i am not sure, if this kind of functionality might be interesting to you. i 
find it quite handy and appreciate it in my very own special mailman setup. 
the PostfixVirtual.py code (orginally taken from Postfix.py in mailman 2.1.5 
(Debian Sarge)) can be downloaded from here:


looking forward to any resonance,
mike gabriel



network administration, ecology centre, kiel university, germany
Mike Gabriel, olshausenstr 75, 24118 kiel, germany

fon-work: +49 431 880-1186
fon-home: +49 431 6474196
mail: mgabriel at ecology.uni-kiel.de
www: http://www.ecology.uni-kiel.de, http://zope.ecology.uni-kiel.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20050121/5b32eadd/attachment-0001.pgp

More information about the Mailman-Developers mailing list