------------------------------------------------------------
revno: 1642
fixes bug: https://launchpad.net/bugs/1570630
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Thu 2016-04-14 16:25:57 -0700
message:
Fixed missing VIRTUAL_MAILMAN_LOCAL_DOMAIN and duplicates in virtual-mailman.
modified:
Mailman/MTA/Postfix.py
NEWS
--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/MTA/Postfix.py'
--- Mailman/MTA/Postfix.py 2016-02-27 23:21:12 +0000
+++ Mailman/MTA/Postfix.py 2016-04-14 23:25:57 +0000
@@ -28,6 +28,7 @@
from Mailman import Utils
from Mailman import LockFile
from Mailman.i18n import C_
+from Mailman.MailList import MailList
from Mailman.MTA.Utils import makealiases
from Mailman.Logging.Syslog import syslog
@@ -132,6 +133,11 @@
sitedest = Utils.ParseEmail(siteaddr)[0]
if mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN:
loopdest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN
+ sitedest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN
+ # If the site list's host_name is a virtual domain, adding it to the
+ # SITE ADDRESSES will duplicate the list posting entry, so comment it.
+ if _isvirtual(MailList(mm_cfg.MAILMAN_SITE_LIST, lock=False)):
+ siteaddr = '#' + siteaddr
# Seek to the end of the text file, but if it's empty write the standard
# disclaimer, and the loop catch address and site address.
fp.seek(0, 2)
@@ -179,6 +185,9 @@
loopdest = Utils.ParseEmail(loopaddr)[0]
siteaddr = Utils.get_site_email(mlist.host_name)
sitedest = Utils.ParseEmail(siteaddr)[0]
+ if mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN:
+ loopdest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN
+ sitedest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN
infp = open(filename)
omask = os.umask(007)
try:
@@ -230,7 +239,7 @@
print >> outfp, '%s\t%s' % (siteaddr, sitedest)
outfp.write(line)
break
- elif line.startswith(siteaddr):
+ elif line.startswith(siteaddr) or line.startswith('#' + siteaddr):
# We just found it
outfp.write(line)
break
=== modified file 'NEWS'
--- NEWS 2016-04-10 04:53:04 +0000
+++ NEWS 2016-04-14 23:25:57 +0000
@@ -19,6 +19,10 @@
Bug fixes and other patches
+ - All addresses in data/virtual-mailman are now properly appended with
+ VIRTUAL_MAILMAN_LOCAL_DOMAIN and duplicates are not generated if the
+ site list is in a virtual domain. (LP: #1570630)
+
- DMARC mitigations will now find the From: domain to the right of the
rightmost '@' rather than the leftmost '@'. (LP: #1568445)
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org