I assume the error is an issue with my postfix configuration. I've followed the steps in the instructions here to set up apache/postfix/mailman.
Real domain replaced with mydomain.com I've created a default mail list called mailman. When I send an email to [email protected] I get the error "Recipient address rejected: User unknown in local recipient table" in the mail.log.
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-wi0-f174.google.com>
Excerpts from my postfix/main.cf:
myhostname = mydomain.com
mydestination = mydomain.com, localhost
inet_protocols = ipv4
relay_domains = mydomain.com
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
Excerpts from /etc/postfix/transport
mydomain.com mailman:
Excerpt from postfix/master.cf
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
If I understand correctly how it should work...
I don't know if this qualifies as an answer but after doing much more reading I came to this conclusion, and hopefully it helps someone else.
There are two ways to configure mailman with postfix. 1. Use the transport maps, as I was trying above 2. Alias mapping
From my reading, method 1 which uses 'postfix-to-mailman.py' is unofficial and not well supported. So I attempted to try method 2 and it worked!
Steps: Remove transport method
Remove lines from postfix/main.cf:
relay_domains = mydomain.com
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
Remove lines from master.cf:
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
Remove any lines from /etc/postfix/transport:
lists.domain.com mailman:
Uncomment line in /usr/lib/mailman/Mailman/mm_cfg.py
MTA = 'Postfix'
Copy alias file to mailman directory and run genaliases to create the alias db
sudo cp /etc/aliases /var/lib/mailman/data/aliases
sudo /usr/lib/mailman/bin/genaliases
sudo chomod g+w /var/lib/mailman/data/aliases.db
Update alias_maps in postfix/main.cf to point to new alias file
alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
Reload and restart
sudo /etc/init.d/postfix reload
sudo service postfix restart