------------------------------------------------------------
revno: 1565
fixes bug: https://launchpad.net/bugs/1459236
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Wed 2015-05-27 08:16:59 -0700
message:
Add mailman@domain entries for virtual domains to data/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 2014-01-09 18:44:08 +0000
+++ Mailman/MTA/Postfix.py 2015-05-27 15:16:59 +0000
@@ -127,10 +127,13 @@
# Set up the mailman-loop address
loopaddr = Utils.get_site_email(mlist.host_name, extra='loop')
loopdest = Utils.ParseEmail(loopaddr)[0]
+ # And the site list posting address.
+ 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
# Seek to the end of the text file, but if it's empty write the standard
- # disclaimer, and the loop catch address.
+ # disclaimer, and the loop catch address and site address.
fp.seek(0, 2)
if not fp.tell():
print >> fp, """\
@@ -145,7 +148,13 @@
# LOOP ADDRESSES START
%s\t%s
# LOOP ADDRESSES END
-""" % (loopaddr, loopdest)
+
+# We also add the site list address in each virtual domain as that address
+# is exposed on admin and listinfo overviews.
+# SITE ADDRESSES START
+%s\t%s
+# SITE ADDRESSES END
+""" % (loopaddr, loopdest, siteaddr, sitedest)
# The text file entries get a little extra info
print >> fp, '# STANZA START:', listname
print >> fp, '# CREATED:', time.ctime(time.time())
@@ -168,6 +177,8 @@
def _check_for_virtual_loopaddr(mlist, filename):
loopaddr = Utils.get_site_email(mlist.host_name, extra='loop')
loopdest = Utils.ParseEmail(loopaddr)[0]
+ siteaddr = Utils.get_site_email(mlist.host_name)
+ sitedest = Utils.ParseEmail(siteaddr)[0]
infp = open(filename)
omask = os.umask(007)
try:
@@ -200,6 +211,32 @@
else:
# This isn't our loop address, so spit it out and continue
outfp.write(line)
+ # Now do it all again for the site list address. It must follow the
+ # loop addresses.
+ while True:
+ line = infp.readline()
+ if not line:
+ break
+ outfp.write(line)
+ if line.startswith('# SITE ADDRESSES START'):
+ break
+ # Now see if our domain has already been written
+ while True:
+ line = infp.readline()
+ if not line:
+ break
+ if line.startswith('# SITE ADDRESSES END'):
+ # It hasn't
+ print >> outfp, '%s\t%s' % (siteaddr, sitedest)
+ outfp.write(line)
+ break
+ elif line.startswith(siteaddr):
+ # We just found it
+ outfp.write(line)
+ break
+ else:
+ # This isn't our loop address, so spit it out and continue
+ outfp.write(line)
outfp.writelines(infp.readlines())
finally:
infp.close()
=== modified file 'NEWS'
--- NEWS 2015-05-01 20:40:36 +0000
+++ NEWS 2015-05-27 15:16:59 +0000
@@ -14,6 +14,12 @@
Bug fixes and other patches
+ - Mailman-Postfix integration will now add mailman@domain entries in
+ data/virtual-mailman for each domain in POSTFIX_STYLE_VIRTUAL_DOMAINS
+ which is a host_name of a list. This is so the addresses which are
+ exposed on admin and listinfo overview pages of virtual domains will
+ be deliverable. (LP: #1459236)
+
- The vette log entry for DMARC policy hits now contains the list name.
(LP: #1450826)
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org