aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Defaults.py.in18
-rw-r--r--Mailman/MTA/Postfix.py6
2 files changed, 23 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