We have a bunch of lists hosted on a CentOS-4.9 server running sendmail and mailman that we are moving to a CentOS-6 vm running postfix and mailman. I am testing the setup and I am running into a problem no doubt caused by my own ignorance wrt postfix.
Based on groking the web I discovered that the recommended way to configure postfix to work with mailman is a script called postfix-to-mailman.py. I installed and modified this script to suit our installation. I followed the instructions therein and made the recommended changes to posfix, to wit:
# postfix-to-mailman.py MailmanHome = "/var/lib/mailman"; # Mailman home data directory
# Add mailman virtual domains to transport # /etc/postfix/transport: # mailman.ourdomain.tld mailman: # mailman.other.tld mailman: # # /etc/postfix/main.cf: # inet_interfaces = localhost, mailman.ourdomain.tld, ... # relay_domains = mailman.ourdomain.tld, ... # transport_maps = hash:/etc/postfix/transport # mailman_destination_recipient_limit = 1 # # /etc/postfix/master.cf # mailman unix - n n - - pipe # flags=FR user=mailman:mailman # argv=/var/mailman/postfix-to-mailman.py ${nexthop} ${user}
The mailman web interface is setup and works. The mm_cfg.py file was altered to handle the virtual domains of the mailing lists. Adding a new list via the web interface generates and successfully delivers via our mail hub the new list instructions to the owner's email. Similarly, adding a new user via the web interface generates and successfully delivers a welcome email.
However, email to the test mailing list does not get processed by mailman. This is what I see in /var/log/maillog:
/var/log/maillog:Mar 22 14:53:53 inet08 postfix/smtpd[2785]: E248860A9A: client=inet06.hamilton.harte-lyne.ca[216.185.71.26] /var/log/maillog:Mar 22 14:53:53 inet08 postfix/cleanup[2789]: E248860A9A: message-id=201203221853.q2MIrrV5026005@inet06.hamilton.harte-lyne.ca /var/log/maillog:Mar 22 14:53:54 inet08 postfix/qmgr[2519]: E248860A9A: from=root@inet06.hamilton.harte-lyne.ca, size=563, nrcpt=1 (queue active) /var/log/maillog:Mar 22 14:53:55 inet08 postfix/error[2792]: E248860A9A: to=test@mailman.byrnejb.ca, relay=none, delay=1.3, delays=0.11/1.1/0/0.07, dsn=4.3.0, status=deferred (unknown mail transport error)
The script postfix-to-mailman.py says that entries in the aliases map are not required for it to work. So, I did not create any.
As I am completely unfamiliar with postfix I cannot interpret the errors I am seeing. It appears that mail is routed correctly to the posfix server but that the delivery agent, presumably mailman, is not working or postfix is unable to connect to it.
Does anyone here have experience getting postfix and mailman working together and, if so, how does one do it? Is postfix-to-mailman.py the proper way to do this or not? Should there be entries in the postfix aliases map for mailman?
On Thu, March 22, 2012 15:21, James B. Byrne wrote:
Based on groking the web I discovered that the recommended way to configure postfix to work with mailman is a script called postfix-to-mailman.py. I installed and modified this script to suit our installation. I followed the instructions therein and made the recommended changes to posfix, to wit:
I eventually got all this working. The script requires a couple of modifications to work with the revised mailman HFS layout adopted by RedHat subsequent to the original script's creation.
Add this variable to postfix-to-mailman.py:
MailmanScripts = "/usr/lib/mailman" # Where mailman scripts reside
Change these lines:
if os.path.exists(local): os.execv(MailmanScripts + "/mail/mailman", (MailmanScripts + "/mail/mailman", type, local))
And you are good to go. As stipulated in the script there is no need to create entries in the aliases map. New mailman lists are picked up automatically.
Otherwise one may simply create a link in /var/lib/mailman to point to /usr/lib/mailman and continue to use the MailmanHome variable everywhere. But changing the script is cleaner I should think.