Tanstaafl wrote:
>
>I wouldn't mind adding the local domain in postfix, but definitely don't
>want to mess with patching MM myself and maintaining it. It's really
>only a cosmetic problem anyway that most likely no one else will ever
>see (how many people ever look at full headers?)...
>
>That said, any chance that MM3 can/will provide a way to do this?
>Something like a DEFAULT_LIST_HOST option?


It turns out there was a Bug/Patch at
<https://bugs.launchpad.net/mailman/+bug/328907> which is related to
this. I've fixed that for MM 2.1.14 with the attached patch which
allows you to specify VIRTUAL_MAILMAN_LOCAL_HOST in mm_cfg.py, and if
you do, it will be appended to the local addresses in virtual-mailman.

As far as MM 3 is concerned, it uses a different delivery method for
Mailman based on LMTP, so this probably isn't applicable.

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

=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in      2010-02-23 01:19:42 +0000
+++ Mailman/Defaults.py.in      2010-05-10 21:31:51 +0000
@@ -396,6 +396,24 @@
 # for details.
 POSTFIX_STYLE_VIRTUAL_DOMAINS = []
 
+# If you specify any virtual domains in the above list, Mailman will generate
+# a virtual-mailman file containing virtual mappings of the form
+#
+# listaddr...@dom2.ain   listaddress
+# etc.
+#
+# to map the list addresses in those domains to local addresses. If you need
+# mappings that specify a domain on the right hand side such as
+#
+# listaddr...@dom2.ain   listaddr...@localhost
+# or
+# listaddr...@dom2.ain   listaddr...@other.local.domain
+#
+# specify the desired local domain in mm_cfg.py as for example
+#
+# VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
+VIRTUAL_MAILMAN_LOCAL_DOMAIN = None
+
 # These variables describe the program to use for regenerating the aliases.db
 # and virtual-mailman.db files, respectively, from the associated plain text
 # files.  The file being updated will be appended to this string (with a

=== modified file 'Mailman/MTA/Postfix.py'
--- Mailman/MTA/Postfix.py      2008-08-22 22:21:26 +0000
+++ Mailman/MTA/Postfix.py      2010-05-10 22:28:28 +0000
@@ -123,6 +123,8 @@
     # Set up the mailman-loop address
     loopaddr = Utils.get_site_email(mlist.host_name, extra='loop')
     loopdest = Utils.ParseEmail(loopaddr)[0]
+    if mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN:
+        loopdest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN
     # Seek to the end of the text file, but if it's empty write the standard
     # disclaimer, and the loop catch address.
     fp.seek(0, 2)
@@ -146,8 +148,12 @@
     # Now add all the standard alias entries
     for k, v in makealiases(listname):
         fqdnaddr = '%...@%s' % (k, hostname)
+        if mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN:
+            localaddr = '%...@%s' % (k, mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN)
+        else:
+            localaddr = 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

=== modified file 'NEWS'
--- NEWS        2010-05-10 21:11:45 +0000
+++ NEWS        2010-05-10 21:45:27 +0000
@@ -17,6 +17,11 @@
 
   Bug Fixes and other patches
 
+    - Provided the ability to specify in mm_cfg.py a local domain (e.g.
+      'localhost') for the local addresses in the generated virtual-mailman
+      when MTA = 'Postfix'.  See VIRTUAL_MAILMAN_LOCAL_DOMAIN in Defaults.py.
+      Bug #328907.
+
     - Made a minor change to the removal of an Approved: pseudo-header from
       a text/html alternative to allow for an inserted '\xA0' before the
       password.

------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to