2

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 mailman@mydomain.com I get the error "Recipient address rejected: User unknown in local recipient table" in the mail.log.

550 5.1.1 <mailman@mydomain.com>: Recipient address rejected: User unknown in local recipient table; from=<-----@gmail.com> to=<mailman@mydomain.com> 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...

  1. mail comes in to mydomain.com
  2. postfix validates the hostname against $myhostname
  3. postfix finds mydomain.com under relay_domains
  4. postfix relays the mail to the transport listed under transport_maps
  5. failing here? the postmap table finds that mailman@mydomain.com matches mydomain.com
  6. postmap directs the mail to the mailman: transport defined in master.cf
  7. the transport mailman: calls postfix-to-mailman.py, and mailman handles the mail
Ryan H
  • 547
  • 1
  • 6
  • 18
  • You are correct! It is recommended not to use postfix-to-mailman.py but use the "alias" method. All the steps are correct except I don't understand why you have to copy /etc/aliases to /var/lib/mailman/data/aliases and you don't need to put mailman/data/alias into alias_database. The official guide to integrate postfix and mailman can be found here, [http://www.list.org/mailman-install/postfix-integration.html](http://www.list.org/mailman-install/postfix-integration.html) Keep in mind that /usr/local/mailman in the link would be /lsr/lib/mailman if you are using Ubuntu. – wolf97084 Dec 16 '14 at 14:06

2 Answers2

11

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:

Switch to alias method

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
Ryan H
  • 547
  • 1
  • 6
  • 18
  • 1
    `s/chomod/chmod/` please :) (one shouldn't add mailman aliases to alias_database as noted below too) – Michael Shigorin Jul 21 '15 at 11:59
  • I have tried your configuration, but when I try to send to a list, I get a 554 error (relay access denied), so I had to change but to using transport maps (with the postfix-to-mailman.py script). Any ideas? – Vasilis Lourdas Oct 15 '15 at 13:14
0

I am using Ubuntu 14.04. After much pain, I got mailing list work with the following steps:

  1. In /etc/apache2/conf-enabled/mailman.conf, I changed as follows. (For apache2 version 2.4 and above)
<Directory /var/lib/mailman/archives/public/>
Options FollowSymlinks
AllowOverride None
#    Order allow,deny
#    Allow from all
Require all granted
</Directory>
  1. Even then, with no mail sent to the list, the web page

http://finelists.kalidoss.com/pipermail/finelists/

complained that I do not have permission to view the page.

  1. Next, I went to the 'admin' web interface of 'finelists'

http://finelists.kalidoss.com/cgi-bin/mailman/admin/finelists

and added the email ids (from whom I may be getting mails) as trusted ones.

  1. Thereafter, I sent a check email from kk@gmail.com to test@gmail.com (mails addressed to test@gmail.com will be delivered to the finelists) and it was displayed alright.

  2. Please use suitable substitutes for finelists, kalidoss.com, kk@gmail.com,test@gmail.com

Hope this helps someone.