mailman not respecting /etc/postfix/transport ???
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
I have about 100 mailing lists all using the domain name tunedinweb.com. All the commands to subscribe, etc, come to something@tunedinweb.com which come to my server and are processed by mailman.
But I also have real email boxes @tunedinweb.com. Those are hosted off my server. So in order to make both mailman and my email work I have postfix configured with tunedinweb.com listed in the mydomains file, but have setup a transport file to tell postfix to redirect any email for something@tunedinweb.com to the server where that email is hosted. With lines in transport that look like this:
steve@tunedinweb.com smtp:mx.emailsrvr.com
stevew@tunedinweb.com smtp:mx.emailsrvr.com
This is all working fine.
The issue is that my email address steve@tunedinweb.com is also a member of several mailing lists. When mailman tries to send to steve@tunedinweb.com I see this error message in the postfix log /var/log/maillog:
Jun 6 17:02:08 166941-web1 postfix/smtpd[25836]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <steve@tunedinweb.com>: Recipient address rejected: User unknown in local recipient table; from=<tunedin-temp-bounces+steve=tunedinweb.com@tunedinweb.com> to=<steve@tunedinweb.com> proto=ESMTP helo=<166941-web1.tunedinweb.com>
So it seems that mailman is not respecting the /etc/postfix transport file settings. I want mailman to send mail for those addresses specified in the transport file to the server where that email is hosted.
I must be missing something. Can someone explain what is going wrong.
Thanks again for your help.
Steve Wehr
Tunedin Web Design <http://www.tunedinweb.com/>
845-246-9643
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 06/22/2016 07:53 AM, Steve Wehr wrote:
Well, yes and no. Something is causing the mail from Mailman lists to be rejected by Postfix for "User unknown in local recipient table" before transport_maps is consulted for this user.
This almost certainly is not a Mailman thing. I suspect the issue is because the mail arrives from localhost[127.0.0.1], not because it's from Mailman.
What do you have for Postfix mynetworks and smtpd_recipient_restrictions? (The output from 'postconf -n' might be useful.)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
I am picking up this old thread that I never solved. Sorry for the delay.
To answer your questions Mark...
Well... There are several other PHP programs on my server that also send email to steve@tunedinweb.com, and those all work fine -- the /etc/postfix/transport file is respected and the mail routed off-platform. Only the mail sent by Mailman is being rejected with postfix errors I included below.
What information could I provide to help figure out why?
Steve Wehr Tunedin Web Design
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+steve=tunedinweb.com@python.org] On Behalf Of Mark Sapiro Sent: Wednesday, June 22, 2016 12:22 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 06/22/2016 07:53 AM, Steve Wehr wrote:
/var/log/maillog:
Well, yes and no. Something is causing the mail from Mailman lists to be rejected by Postfix for "User unknown in local recipient table" before transport_maps is consulted for this user.
This almost certainly is not a Mailman thing. I suspect the issue is because the mail arrives from localhost[127.0.0.1], not because it's from Mailman.
What do you have for Postfix mynetworks and smtpd_recipient_restrictions? (The output from 'postconf -n' might be useful.)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/steve%40tunedinweb.com
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/08/2016 08:03 AM, Steve Wehr wrote:
To answer your questions Mark...
...
What information could I provide to help figure out why?
How about
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Here it is....
/etc/postfix>postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = ipv4 mail_owner = postfix mailbox_command = /usr/bin/procmail mailbox_size_limit = 256000000 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 68157440 mydestination = hash:/etc/postfix/mydomains myhostname = tunedinweb.com mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32 newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES recipient_delimiter = + sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_security_options = noplaintext smtp_tls_loglevel = 1 smtpd_banner = $myhostname ESMTP $mail_name smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rbl_client sbl.spamhaus.org, reject_rbl_client xbl.spamhaus.org, reject_unauth_destination, check_policy_service unix:postgrey/socket smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/postfix/postfix.crt smtpd_tls_key_file = /etc/postfix/postfix.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_use_tls = yes transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Thursday, September 08, 2016 11:21 AM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/08/2016 08:03 AM, Steve Wehr wrote:
To answer your questions Mark...
...
What information could I provide to help figure out why?
How about
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/08/2016 02:02 PM, Steve Wehr wrote:
What's in /etc/postfix/mydomains
...
transport_maps = hash:/etc/postfix/transport
What's in /etc/postfix/transport
And what's in Mailman's Defaults.py/mm_cfg.py for SMTPPORT
Before answering the above try the following:
Assuming the Defaults.py settings are:
SMTPHOST = 'localhost' SMTPPORT = 0
and they aren't overridden in mm_cfg.py, try the following shell session (postfix replies not shown)
$ telnet localhost 25 EHLO tunedinweb.com MAIL FROM: <steve@tunedinweb.com> RCPT TO: <steve@tunedinweb.com> DATA . QUIT
If that gives the error, try the same thing, but do
$ telnet 127.0.0.1 25
to start. If that works but 'localhost' gives the reject try adding localhost to
mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32
and if that doesn't solve it, add
SMTPHOST = '127.0.0.1'
to mm_cfg.py.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Thanks Mark, Here are the results of the tests you suggested. Both attempts at telnet failed.
Tried your experiment:
/etc/postfix>telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 550 5.1.1 <steve@tunedinweb.com>: Recipient address rejected: User unknown in local recipient table quit 221 2.0.0 Bye Connection closed by foreign host.
/etc/postfix>telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 550 5.1.1 <steve@tunedinweb.com>: Recipient address rejected: User unknown in local recipient table quit 221 2.0.0 Bye Connection closed by foreign host.
from Defaults.py. Not in mm_cfg.py SMTPHOST = 'localhost' SMTPPORT = 0
/etc/postfix/mydomains: localhost OK tunedin OK # Always keep tunedinweb.com as a local domain, so that we can process mailman # email commands tunedinweb.com OK
/etc/postfix/transport: steve@tunedinweb.com smtp:mx.emailsrvr.com steves@tunedinweb.com smtp:mx.emailsrvr.com stevew@tunedinweb.com smtp:mx.emailsrvr.com wehr@tunedinweb.com smtp:mx.emailsrvr.com stiert@tunedinweb.com smtp:mx.emailsrvr.com admin@tunedinweb.com smtp:mx.emailsrvr.com errors@tunedinweb.com smtp:mx.emailsrvr.com events@tunedinweb.com smtp:mx.emailsrvr.com feedback@tunedinweb.com smtp:mx.emailsrvr.com email@tunedinweb.com smtp:mx.emailsrvr.com ideachamp_order@tunedinweb.com smtp:mx.emailsrvr.com inquiry@tunedinweb.com smtp:mx.emailsrvr.com mailman@tunedinweb.com smtp:mx.emailsrvr.com mailman_admin@tunedinweb.com smtp:mx.emailsrvr.com mailman-owner@tunedinweb.com smtp:mx.emailsrvr.com orders@tunedinweb.com smtp:mx.emailsrvr.com payments@tunedinweb.com smtp:mx.emailsrvr.com root@tunedinweb.com smtp:mx.emailsrvr.com security@tunedinweb.com smtp:mx.emailsrvr.com tunedin@tunedinweb.com smtp:mx.emailsrvr.com verify@tunedinweb.com smtp:mx.emailsrvr.com abuse@tunedinweb.com smtp:mx.emailsrvr.com postmaster@tunedinweb.com smtp:mx.emailsrvr.com
(mx.emailsrvr.com is the rackspace email server where the mailbox for tunedinweb.com is hosted.)
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Thursday, September 08, 2016 5:51 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/08/2016 02:02 PM, Steve Wehr wrote:
What's in /etc/postfix/mydomains
...
transport_maps = hash:/etc/postfix/transport
What's in /etc/postfix/transport
And what's in Mailman's Defaults.py/mm_cfg.py for SMTPPORT
Before answering the above try the following:
Assuming the Defaults.py settings are:
SMTPHOST = 'localhost' SMTPPORT = 0
and they aren't overridden in mm_cfg.py, try the following shell session (postfix replies not shown)
$ telnet localhost 25 EHLO tunedinweb.com MAIL FROM: <steve@tunedinweb.com> RCPT TO: <steve@tunedinweb.com> DATA . QUIT
If that gives the error, try the same thing, but do
$ telnet 127.0.0.1 25
to start. If that works but 'localhost' gives the reject try adding localhost to
mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32
and if that doesn't solve it, add
SMTPHOST = '127.0.0.1'
to mm_cfg.py.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Here's another clue Mark...
I had noticed that on some mailing lists I was subscribed as steve@tunedinweb.com, and on some others as tunedin@tunedinweb.com. The former are failing as per my origilam problem, but the latter are sent successfully.
So I tried:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <tunedin@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
This works! Why??
Both steve@tunedinweb.com and tunedin@tunedinweb.com are defined exactly the same in /etc/postfix/transport.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, September 09, 2016 1:38 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
I tried almost all the email addresses defined in /etc/postfix/transport
Many of them succeed in the telnet test below, but many of them fail. There is no pattern I can find to success or failure. I thought maybe there was some hidden characters in the file that were preventing the hashing working when the file is compiled. So I was looking to see if all the ones above a certain spot in the file failed, and all those below succeeded, but that is not the case. Ideas?
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Steve Wehr [mailto:steve@tunedinweb.com] Sent: Saturday, September 10, 2016 10:22 AM To: 'Mark Sapiro' Cc: 'Mailman-Users@python.org' Subject: RE: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
Here's another clue Mark...
I had noticed that on some mailing lists I was subscribed as steve@tunedinweb.com, and on some others as tunedin@tunedinweb.com. The former are failing as per my origilam problem, but the latter are sent successfully.
So I tried:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <tunedin@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
This works! Why??
Both steve@tunedinweb.com and tunedin@tunedinweb.com are defined exactly the same in /etc/postfix/transport.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, September 09, 2016 1:38 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/10/2016 07:35 AM, Steve Wehr wrote:
Are the ones that work in /etc/passwd and or /etc/aliases and the ones that fail not?
I wrote:
The answer to this may still be of interest.
Have you tried this? I think it will work. If the answer to my first question above is yes, I'm sure it will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Hi Mark -- I think it is fixed....
I updated /etc/postfix/main.cf with local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
Then I sent out a mailing from a test mailing list I have that includes my email address -- steve@tunedinweb.com. --> I received this mailing. YEAH!
I did look in /etc/passwd and /etc/aliases... and did find "tunedin" in /etc/passwd, so is that why Mailman was able to deliver to tunedin@tunedinweb.com ?? (I didn't find any of the other email addresses listed in /etc/postfix/transport in either of those files, so I don't know why some of those passed the telnet test and others did not)
FYI... steve@tunedinweb.com now passes the telnet test:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Saturday, September 10, 2016 12:24 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/10/2016 07:35 AM, Steve Wehr wrote:
Are the ones that work in /etc/passwd and or /etc/aliases and the ones that fail not?
I wrote:
The answer to this may still be of interest.
Have you tried this? I think it will work. If the answer to my first question above is yes, I'm sure it will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 06/22/2016 07:53 AM, Steve Wehr wrote:
Well, yes and no. Something is causing the mail from Mailman lists to be rejected by Postfix for "User unknown in local recipient table" before transport_maps is consulted for this user.
This almost certainly is not a Mailman thing. I suspect the issue is because the mail arrives from localhost[127.0.0.1], not because it's from Mailman.
What do you have for Postfix mynetworks and smtpd_recipient_restrictions? (The output from 'postconf -n' might be useful.)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
I am picking up this old thread that I never solved. Sorry for the delay.
To answer your questions Mark...
Well... There are several other PHP programs on my server that also send email to steve@tunedinweb.com, and those all work fine -- the /etc/postfix/transport file is respected and the mail routed off-platform. Only the mail sent by Mailman is being rejected with postfix errors I included below.
What information could I provide to help figure out why?
Steve Wehr Tunedin Web Design
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+steve=tunedinweb.com@python.org] On Behalf Of Mark Sapiro Sent: Wednesday, June 22, 2016 12:22 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 06/22/2016 07:53 AM, Steve Wehr wrote:
/var/log/maillog:
Well, yes and no. Something is causing the mail from Mailman lists to be rejected by Postfix for "User unknown in local recipient table" before transport_maps is consulted for this user.
This almost certainly is not a Mailman thing. I suspect the issue is because the mail arrives from localhost[127.0.0.1], not because it's from Mailman.
What do you have for Postfix mynetworks and smtpd_recipient_restrictions? (The output from 'postconf -n' might be useful.)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/steve%40tunedinweb.com
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/08/2016 08:03 AM, Steve Wehr wrote:
To answer your questions Mark...
...
What information could I provide to help figure out why?
How about
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Here it is....
/etc/postfix>postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = ipv4 mail_owner = postfix mailbox_command = /usr/bin/procmail mailbox_size_limit = 256000000 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 68157440 mydestination = hash:/etc/postfix/mydomains myhostname = tunedinweb.com mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32 newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES recipient_delimiter = + sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_security_options = noplaintext smtp_tls_loglevel = 1 smtpd_banner = $myhostname ESMTP $mail_name smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rbl_client sbl.spamhaus.org, reject_rbl_client xbl.spamhaus.org, reject_unauth_destination, check_policy_service unix:postgrey/socket smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/postfix/postfix.crt smtpd_tls_key_file = /etc/postfix/postfix.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_use_tls = yes transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Thursday, September 08, 2016 11:21 AM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/08/2016 08:03 AM, Steve Wehr wrote:
To answer your questions Mark...
...
What information could I provide to help figure out why?
How about
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/08/2016 02:02 PM, Steve Wehr wrote:
What's in /etc/postfix/mydomains
...
transport_maps = hash:/etc/postfix/transport
What's in /etc/postfix/transport
And what's in Mailman's Defaults.py/mm_cfg.py for SMTPPORT
Before answering the above try the following:
Assuming the Defaults.py settings are:
SMTPHOST = 'localhost' SMTPPORT = 0
and they aren't overridden in mm_cfg.py, try the following shell session (postfix replies not shown)
$ telnet localhost 25 EHLO tunedinweb.com MAIL FROM: <steve@tunedinweb.com> RCPT TO: <steve@tunedinweb.com> DATA . QUIT
If that gives the error, try the same thing, but do
$ telnet 127.0.0.1 25
to start. If that works but 'localhost' gives the reject try adding localhost to
mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32
and if that doesn't solve it, add
SMTPHOST = '127.0.0.1'
to mm_cfg.py.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Thanks Mark, Here are the results of the tests you suggested. Both attempts at telnet failed.
Tried your experiment:
/etc/postfix>telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 550 5.1.1 <steve@tunedinweb.com>: Recipient address rejected: User unknown in local recipient table quit 221 2.0.0 Bye Connection closed by foreign host.
/etc/postfix>telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 550 5.1.1 <steve@tunedinweb.com>: Recipient address rejected: User unknown in local recipient table quit 221 2.0.0 Bye Connection closed by foreign host.
from Defaults.py. Not in mm_cfg.py SMTPHOST = 'localhost' SMTPPORT = 0
/etc/postfix/mydomains: localhost OK tunedin OK # Always keep tunedinweb.com as a local domain, so that we can process mailman # email commands tunedinweb.com OK
/etc/postfix/transport: steve@tunedinweb.com smtp:mx.emailsrvr.com steves@tunedinweb.com smtp:mx.emailsrvr.com stevew@tunedinweb.com smtp:mx.emailsrvr.com wehr@tunedinweb.com smtp:mx.emailsrvr.com stiert@tunedinweb.com smtp:mx.emailsrvr.com admin@tunedinweb.com smtp:mx.emailsrvr.com errors@tunedinweb.com smtp:mx.emailsrvr.com events@tunedinweb.com smtp:mx.emailsrvr.com feedback@tunedinweb.com smtp:mx.emailsrvr.com email@tunedinweb.com smtp:mx.emailsrvr.com ideachamp_order@tunedinweb.com smtp:mx.emailsrvr.com inquiry@tunedinweb.com smtp:mx.emailsrvr.com mailman@tunedinweb.com smtp:mx.emailsrvr.com mailman_admin@tunedinweb.com smtp:mx.emailsrvr.com mailman-owner@tunedinweb.com smtp:mx.emailsrvr.com orders@tunedinweb.com smtp:mx.emailsrvr.com payments@tunedinweb.com smtp:mx.emailsrvr.com root@tunedinweb.com smtp:mx.emailsrvr.com security@tunedinweb.com smtp:mx.emailsrvr.com tunedin@tunedinweb.com smtp:mx.emailsrvr.com verify@tunedinweb.com smtp:mx.emailsrvr.com abuse@tunedinweb.com smtp:mx.emailsrvr.com postmaster@tunedinweb.com smtp:mx.emailsrvr.com
(mx.emailsrvr.com is the rackspace email server where the mailbox for tunedinweb.com is hosted.)
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Thursday, September 08, 2016 5:51 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/08/2016 02:02 PM, Steve Wehr wrote:
What's in /etc/postfix/mydomains
...
transport_maps = hash:/etc/postfix/transport
What's in /etc/postfix/transport
And what's in Mailman's Defaults.py/mm_cfg.py for SMTPPORT
Before answering the above try the following:
Assuming the Defaults.py settings are:
SMTPHOST = 'localhost' SMTPPORT = 0
and they aren't overridden in mm_cfg.py, try the following shell session (postfix replies not shown)
$ telnet localhost 25 EHLO tunedinweb.com MAIL FROM: <steve@tunedinweb.com> RCPT TO: <steve@tunedinweb.com> DATA . QUIT
If that gives the error, try the same thing, but do
$ telnet 127.0.0.1 25
to start. If that works but 'localhost' gives the reject try adding localhost to
mynetworks = 23.253.149.133/32, 127.0.0.0/8, 10.208.195.27/32
and if that doesn't solve it, add
SMTPHOST = '127.0.0.1'
to mm_cfg.py.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Here's another clue Mark...
I had noticed that on some mailing lists I was subscribed as steve@tunedinweb.com, and on some others as tunedin@tunedinweb.com. The former are failing as per my origilam problem, but the latter are sent successfully.
So I tried:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <tunedin@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
This works! Why??
Both steve@tunedinweb.com and tunedin@tunedinweb.com are defined exactly the same in /etc/postfix/transport.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, September 09, 2016 1:38 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
I tried almost all the email addresses defined in /etc/postfix/transport
Many of them succeed in the telnet test below, but many of them fail. There is no pattern I can find to success or failure. I thought maybe there was some hidden characters in the file that were preventing the hashing working when the file is compiled. So I was looking to see if all the ones above a certain spot in the file failed, and all those below succeeded, but that is not the case. Ideas?
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Steve Wehr [mailto:steve@tunedinweb.com] Sent: Saturday, September 10, 2016 10:22 AM To: 'Mark Sapiro' Cc: 'Mailman-Users@python.org' Subject: RE: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
Here's another clue Mark...
I had noticed that on some mailing lists I was subscribed as steve@tunedinweb.com, and on some others as tunedin@tunedinweb.com. The former are failing as per my origilam problem, but the latter are sent successfully.
So I tried:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix EHLO tunedinweb.com 250-tunedinweb.com 250-PIPELINING 250-SIZE 68157440 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <tunedin@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
This works! Why??
Both steve@tunedinweb.com and tunedin@tunedinweb.com are defined exactly the same in /etc/postfix/transport.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, September 09, 2016 1:38 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/09/2016 07:33 AM, Steve Wehr wrote:
Interesting. I suggest you put
SMTPHOST = '127.0.0.1'
in mm_cfg.py since 'localhost' seems to resolve at least first to an IPv6 address on which Postfix isn't listening. I don't see exactly how this will help, but it might.
Now, given that Postfix doesn't like steve@tunedinweb.com, the question is what are the PHP scripts that mail to this address doing. Are they connecting to this Postfix differently or even at all (maybe they connect to mx.emailsrvr.com).
If you add
local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
to Postfix main.cf, I think that will work. This is actually only adding $transport_maps as proxy:unix:passwd.byname and $alias_maps are the defaults. This will ensure that none of the addresses in transport_maps (/etc/postfix/transport) is rejected as an unknown local recipient.
It appears that Postfix is doing the local recipient check before consulting transport_maps for a transport.
I'm not that knowledgeable about the details of Postfix to fully understand this, but I think adding $transport_maps to local_recipient_maps in this case will solve your issue without causing other problems, but I suggest you test and be prepared to reverse when you do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/10/2016 07:35 AM, Steve Wehr wrote:
Are the ones that work in /etc/passwd and or /etc/aliases and the ones that fail not?
I wrote:
The answer to this may still be of interest.
Have you tried this? I think it will work. If the answer to my first question above is yes, I'm sure it will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/55213091c571f7b5bfa38ef44de94559.jpg?s=120&d=mm&r=g)
Hi Mark -- I think it is fixed....
I updated /etc/postfix/main.cf with local_recipient_maps = proxy:unix:passwd.byname $alias_maps $transport_maps
Then I sent out a mailing from a test mailing list I have that includes my email address -- steve@tunedinweb.com. --> I received this mailing. YEAH!
I did look in /etc/passwd and /etc/aliases... and did find "tunedin" in /etc/passwd, so is that why Mailman was able to deliver to tunedin@tunedinweb.com ?? (I didn't find any of the other email addresses listed in /etc/postfix/transport in either of those files, so I don't know why some of those passed the telnet test and others did not)
FYI... steve@tunedinweb.com now passes the telnet test:
telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 tunedinweb.com ESMTP Postfix MAIL FROM: <steve@tunedinweb.com> 250 2.1.0 Ok RCPT TO: <steve@tunedinweb.com> 250 2.1.5 Ok quit 221 2.0.0 Bye Connection closed by foreign host.
Steve Wehr Tunedin Web Design 845-246-9643
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Saturday, September 10, 2016 12:24 PM To: Steve Wehr Cc: Mailman-Users@python.org Subject: Re: [Mailman-Users] mailman not respecting /etc/postfix/transport ???
On 09/10/2016 07:35 AM, Steve Wehr wrote:
Are the ones that work in /etc/passwd and or /etc/aliases and the ones that fail not?
I wrote:
The answer to this may still be of interest.
Have you tried this? I think it will work. If the answer to my first question above is yes, I'm sure it will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Steve Wehr