On 05/27/2015 08:09 AM, EyeLand wrote: > > Maybe these files help for solve the bug > > /var/lib/mailman/data/virtual-mailman > https://gist.githubusercontent.com/eyeland/c4095804712e4af3f892/raw/88c951b3a0bdda63253e45bc1fd0af6cc7c59615/gistfile1.txt
The bug is fixed. The attached patch to Mailman/MTA/Postfix.py will fix it. If you apply that patch and rerun bin/genaliases, it will add entries for the mail...@list.ournet.biz and mail...@list.mobilier.md addresses to data/virtual-mailman. > that is right on file /var/lib/mailman/data/virtual-mailman.db I found > mail...@list.mobilier.md <mailto:mail...@list.mobilier.md> So again, standard Mailman-Postfix integration without transport maps does appear to work in your case. That means you can remove POSTFIX_MAP_CMD = '/etc/mailman/virtual_to_transport.sh' from mm_cfg.py and change transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf in postfix/main.cf to just transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf and thus simplify your Postfix config and make it more standard, although it will continue to work as you have it. Also the mm_cfg.py you posted previously does not contain the lines add_virtualhost('list.ournet.biz', 'list.ournet.biz') add_virtualhost('list.mobilier.md', 'list.mobilier.md') and it should. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
=== modified file 'Mailman/MTA/Postfix.py' --- Mailman/MTA/Postfix.py 2014-01-09 18:44:08 +0000 +++ Mailman/MTA/Postfix.py 2015-05-27 14:41:26 +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()
------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org https://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: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org