diff options
author | Mark Sapiro <mark@msapiro.net> | 2010-05-10 14:47:36 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2010-05-10 14:47:36 -0700 |
commit | 30bcc291af91bcea7293a09197e4cb03b7a9bf5a (patch) | |
tree | f813f9da5c6cc0fb28f0066cd9d80248c4db942b | |
parent | 19d9f08506570461788033406ea7f662f3f21aeb (diff) | |
download | mailman2-30bcc291af91bcea7293a09197e4cb03b7a9bf5a.tar.gz mailman2-30bcc291af91bcea7293a09197e4cb03b7a9bf5a.tar.xz mailman2-30bcc291af91bcea7293a09197e4cb03b7a9bf5a.zip |
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.
-rw-r--r-- | Mailman/Defaults.py.in | 18 | ||||
-rw-r--r-- | Mailman/MTA/Postfix.py | 6 | ||||
-rw-r--r-- | NEWS | 5 |
3 files changed, 28 insertions, 1 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 4aaee1d1..5702f0e1 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -396,6 +396,24 @@ MTA = 'Manual' # 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 +# +# listaddress@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 +# +# listaddress@dom2.ain listaddress@localhost +# or +# listaddress@dom2.ain listaddress@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 diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py index daa9692f..0d729188 100644 --- a/Mailman/MTA/Postfix.py +++ b/Mailman/MTA/Postfix.py @@ -146,8 +146,12 @@ def _addvirtual(mlist, fp): # Now add all the standard alias entries for k, v in makealiases(listname): fqdnaddr = '%s@%s' % (k, hostname) + if mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN: + localaddr = '%s@%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 @@ -17,6 +17,11 @@ Here is a history of user visible changes to Mailman. 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. |