Geoff Shang wrote:

>On Wed, 7 Oct 2009, Ashley M. Kirchner wrote:
>
>>   I have a multi setup for mailman to host multiple domains.  All my list 
>> domains are configured as 'lists.$domain', for example 'lists.yeehaw.net'. 
>> My mailman installations all go under /home/mailman/lists.$domain
>>
>>   I don't know how this is done in postfix, but in sendmail I have the 
>> following:
>>
>>   =====> /etc/mail/aliases/$domain-aliases
>>   mailman-lists.$domain           \
>>       "|/home/mailman/lists.$domain/mail/$domain-mailman post mailman"
>>   mailman-admin-lists.$domain:    \
>>       "|/home/mailman/lists.$domain/mail/$domain-mailman admin mailman"
>
>Ok but how do you get Mailman to produce alias tables that look like that? 
>Or don't you?  Mine only  have the list address part, not the fully 
>qualified list address.


For Postfix integration, you need to do a few things.

Consider only the one mailman instance for the domain example.com. The
others will be analagous.

in mm_cfg.py, add

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com']

This will cause mailman to also write data/virtual-mailman with entries
like

l...@example.com        list
list-ad...@example.com  list-admin
...

in addition to data/aliases with entries like

list:       "|path/to/wrapper post list"
list-admin: "|path/to/wrapper admin list"
...

for each list. The data/virtual-mailman(.db) is analagous to Ashley's
/etc/mail/virtusertable.

There is still a problem in that there is a potential list name
conflict, so to resolve that, you need to make a patch (see attached
Postfix.patch.txt) to Mailman/MTA/Postfix to make virtual-mailman and
aliases look like

l...@example.com        list.example.com
list-ad...@example.com  list-admin.example.com
...

and

list.example.com:       "|path/to/wrapper post list"
list-admin.example.com: "|path/to/wrapper admin list"
...


Then you need the following in Postfix's main.cf

alias_maps = ...
   hash:/path/to/example.com's/data/aliases


virtual_alias_domains ...  example.com

virtual_alias_maps = ...
   hash:/path/to/example.com's/data/virtual-mailman

And probably also if you don't have them anyway

recipient_delimiter = +
unknown_local_recipient_reject_code = 550

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

--- f:/test-mailman-2.1/Mailman/MTA/Postfix.py  2008-08-22 15:18:57.000000000 
-0700
+++ f:/test-mailman/Mailman/MTA/Postfix.py      2009-10-07 17:24:52.218750000 
-0700
@@ -102,14 +102,16 @@
     if mlist is None:
         return
     listname = mlist.internal_name()
+    hostname = mlist.host_name
     fieldsz = len(listname) + len('-unsubscribe')
     # The text file entries get a little extra info
     print >> fp, '# STANZA START:', listname
     print >> fp, '# CREATED:', time.ctime(time.time())
     # Now add all the standard alias entries
     for k, v in makealiases(listname):
+        qname = '%s.%s:' % (k, hostname)
         # Format the text file nicely
-        print >> fp, k + ':', ((fieldsz - len(k)) * ' ') + v
+        print >> fp, qname, ((fieldsz - len(k)) * ' ') + v
     # Finish the text file stanza
     print >> fp, '# STANZA END:', listname
     print >> fp
@@ -147,7 +149,7 @@
     for k, v in makealiases(listname):
         fqdnaddr = '%...@%s' % (k, hostname)
         # Format the text file nicely
-        print >> fp, fqdnaddr, ((fieldsz - len(k)) * ' '), k
+        print >> fp, fqdnaddr, ((fieldsz - len(k)) * ' '), k + '.' + hostname
     # Finish the text file stanza
     print >> fp, '# STANZA END:', listname
     print >> fp
------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
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://wiki.list.org/x/QIA9

Reply via email to