[opensuse] User unknown in relay recipient table when sending mail to user alias
I'm still on a quest to set up my own local mail server. So far, I've managed to get it almost 100%... I can send and receive mail to $USER finally using DynDNS as the relay for sending and receiving. I have a weird problem though with some of the mail aliases... In my /etc/aliases file I have root: clayton postmaster: root abuse: postmaster test1: clayton test2: clayton (plus more) If I read this right, email sent to root, postmaster, abuse, test1 or test2@mydomain.com should all arrive in my inbox... emails sent from an external mail server to clayton and test1 get through, but emails sent to abuse, postmaster, test2 do not. If I send locally (using mailx for example) then the mails get through and are all received by the right user. In all cases mails sent from an external mail server to abuse, postmaster and test2 on my domain are rejected with this error: Recipient address rejected: User unknown in relay recipient table (state 14). So.. what am I missing here? Why are the aliases being ignored... and the mails being bounced? The aliases appear to be set up correctly (since I can send local mail to them and the mails are delivered to the right user)... kinda stumped on this one. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
In all cases mails sent from an external mail server to abuse, postmaster and test2 on my domain are rejected with this error:
Recipient address rejected: User unknown in relay recipient table (state 14).
There's something wrong with your domain setup - your mailserver should not be looking to relay something destined for itself. The error should be something like "Recipient address rejected: User unknown in LOCAL recipient table". I think your aliases are being ignored because your server thins it has to relay them to another server. /Per -- Per Jessen, Zürich (18.2°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Per Jessen
There's something wrong with your domain setup - your mailserver should not be looking to relay something destined for itself. The error should be something like "Recipient address rejected: User unknown in LOCAL recipient table".
I think your aliases are being ignored because your server thins it has to relay them to another server.
perhaps not running "newalias" after making changes ?? -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
I'm still on a quest to set up my own local mail server. So far, I've managed to get it almost 100%... I can send and receive mail to $USER finally using DynDNS as the relay for sending and receiving.
I have a weird problem though with some of the mail aliases...
In my /etc/aliases file I have
root: clayton postmaster: root abuse: postmaster test1: clayton test2: clayton (plus more)
If I read this right, email sent to root, postmaster, abuse, test1 or test2@mydomain.com should all arrive in my inbox... emails sent from an external mail server to clayton and test1 get through, but emails sent to abuse, postmaster, test2 do not. If I send locally (using mailx for example) then the mails get through and are all received by the right user.
In all cases mails sent from an external mail server to abuse, postmaster and test2 on my domain are rejected with this error:
Recipient address rejected: User unknown in relay recipient table (state 14).
So.. what am I missing here? Why are the aliases being ignored... and the mails being bounced? The aliases appear to be set up correctly (since I can send local mail to them and the mails are delivered to the right user)... kinda stumped on this one.
/etc/aliases are only checked for local domains in mydestination, not for relay_domains. For that you need virtual_alias_maps. The real question is why do you have a relay_domain, when the domain should be a local domain? -- Sandy List replies only please! Please address PMs to: news-reply2 (@) drobic (.) de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
/etc/aliases are only checked for local domains in mydestination, not for relay_domains. For that you need virtual_alias_maps.
The real question is why do you have a relay_domain, when the domain should be a local domain?
No clue why I apparently have a relay domain setup/turned on somewhere. I'm using a default main.cf from postfix as it was installed from YaST... then I tweaked it to add values for mydomain, myhostname, relayhost, smtp_sasl_auth_enable. This is currently working perfectly for my primary user, and the first alias I defined for that user. What main.cf setting enables a relay domain? The relayhost setting is for my SMTP relay for outbound... and this is being routed correctly through my DynDSN Mail relay (ie I can send from mailx, and KMail via the Mail Relay I have with DynDNS). I only got looking into this late last night because I noticed that the other default aliases were not working... mail sent to root, postmaster, abuse etc is never delivered.. instead it was bouncing. the only mail getting through is to my primary user and the first alias I defined. I have run newaliases after adding new test aliases in/etc/aliases. I also looked into the /etc/postfix/virtual setup, and tried adding a few test aliases there... but with no effect that I can see. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
/etc/aliases are only checked for local domains in mydestination, not for relay_domains. For that you need virtual_alias_maps.
The real question is why do you have a relay_domain, when the domain should be a local domain?
No clue why I apparently have a relay domain setup/turned on somewhere. I'm using a default main.cf from postfix as it was installed from YaST... then I tweaked it to add values for mydomain, myhostname, relayhost, smtp_sasl_auth_enable. This is currently working perfectly for my primary user, and the first alias I defined for that user. What main.cf setting enables a relay domain?
The Default for relay_domains is: postconf -d relay_domains relay_domains = $mydestination Meaning, that all subdomains listed in mydestination become relay_domains. Check that the domain you wish to receive as a local domain is included in mydestination. Also set relay_domains to an empty value to disable the subdomain trap. relay_domains =
The relayhost setting is for my SMTP relay for outbound... and this is being routed correctly through my DynDSN Mail relay (ie I can send from mailx, and KMail via the Mail Relay I have with DynDNS).
I only got looking into this late last night because I noticed that the other default aliases were not working... mail sent to root, postmaster, abuse etc is never delivered.. instead it was bouncing. the only mail getting through is to my primary user and the first alias I defined.
I have run newaliases after adding new test aliases in/etc/aliases.
I also looked into the /etc/postfix/virtual setup, and tried adding a few test aliases there... but with no effect that I can see.
I can't see anything either, literally, as I do not see through your eyes. In other words: I can't help if I don't know how you set up Postfix. The output of "postconf -n" should be sufficient. -- Sandy List replies only please! Please address PMs to: news-reply2 (@) drobic (.) de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
The Default for relay_domains is: postconf -d relay_domains relay_domains = $mydestination
Meaning, that all subdomains listed in mydestination become relay_domains.
Check that the domain you wish to receive as a local domain is included in mydestination.
postconf -d relay_domains relay_domains = $mydestination postconf -d mydestination mydestination = $myhostname, localhost.$mydomain, localhost postconf -d mydomain mydomain = localdomain Localdomain?
Also set relay_domains to an empty value to disable the subdomain trap.
relay_domains =
OK, tried that and the mails are still bouncing - on old aliases like postmaster, abuse etc.
The output of "postconf -n" should be sufficient.
That would probably help :-P Here's the output (sanitized a little.. I removed my real domain name and substituted "mydomain.com") alias_maps = hash:/etc/aliases biff = no canonical_maps = hash:/etc/postfix/canonical command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix data_directory = /var/lib/postfix debug_peer_level = 2 defer_transports = delay_warning_time = 1h disable_dns_lookups = no disable_mime_output_conversion = no html_directory = /usr/share/doc/packages/postfix-doc/html inet_protocols = all mail_spool_directory = /var/mail mailbox_command = mailbox_size_limit = 0 mailbox_transport = mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man masquerade_classes = envelope_sender, header_sender, header_recipient masquerade_domains = masquerade_exceptions = root message_size_limit = 10240000 message_strip_characters = \0 mydestination = $myhostname, $mydomain, localhost.$mydomain mydomain = mydomain.com myhostname = linux-tliy.mydomain.com myorigin = $mydomain newaliases_path = /usr/bin/newaliases readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES relay_domains = relayhost = outbound.mailhop.org:2525 relocated_maps = hash:/etc/postfix/relocated sample_directory = /usr/share/doc/packages/postfix-doc/samples sender_canonical_maps = hash:/etc/postfix/sender_canonical sendmail_path = /usr/sbin/sendmail setgid_group = maildrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/password smtp_sasl_security_options = smtp_use_tls = no smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtpd_reject_unlisted_sender = no smtpd_sasl_auth_enable = no smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_use_tls = no strict_8bitmime = no strict_rfc821_envelopes = no transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_domains = hash:/etc/postfix/virtual virtual_alias_maps = hash:/etc/postfix/virtual -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
The Default for relay_domains is: postconf -d relay_domains relay_domains = $mydestination
Meaning, that all subdomains listed in mydestination become relay_domains.
Check that the domain you wish to receive as a local domain is included in mydestination.
postconf -d relay_domains relay_domains = $mydestination
Grin! Here's one of your problems (a very common one): you haven't researched what the command does. postconf -d : shows the default settings postconf param : shows the actual value of the parameter postconf -n : shows all parameters that deviate from the default
postconf -d mydestination mydestination = $myhostname, localhost.$mydomain, localhost
postconf -d mydomain mydomain = localdomain
Localdomain?
That is the reason why these are useless. (^-^)
Also set relay_domains to an empty value to disable the subdomain trap.
relay_domains =
OK, tried that and the mails are still bouncing - on old aliases like postmaster, abuse etc.
The output of "postconf -n" should be sufficient.
That would probably help :-P
Here's the output (sanitized a little.. I removed my real domain name and substituted "mydomain.com")
alias_maps = hash:/etc/aliases biff = no canonical_maps = hash:/etc/postfix/canonical command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix data_directory = /var/lib/postfix debug_peer_level = 2 defer_transports = delay_warning_time = 1h disable_dns_lookups = no disable_mime_output_conversion = no html_directory = /usr/share/doc/packages/postfix-doc/html inet_protocols = all mail_spool_directory = /var/mail mailbox_command = mailbox_size_limit = 0 mailbox_transport = mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man masquerade_classes = envelope_sender, header_sender, header_recipient masquerade_domains = masquerade_exceptions = root message_size_limit = 10240000 message_strip_characters = \0 mydestination = $myhostname, $mydomain, localhost.$mydomain
These are the domains that your postfix server sees as local domains: mydomain.com linux-tliy.mydomain.com Valid recipients are in /etc/passwd and /etc/aliases. What does the logline say about the bounced email?
mydomain = mydomain.com myhostname = linux-tliy.mydomain.com myorigin = $mydomain newaliases_path = /usr/bin/newaliases readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES relay_domains = relayhost = outbound.mailhop.org:2525 relocated_maps = hash:/etc/postfix/relocated sample_directory = /usr/share/doc/packages/postfix-doc/samples sender_canonical_maps = hash:/etc/postfix/sender_canonical sendmail_path = /usr/sbin/sendmail setgid_group = maildrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/password smtp_sasl_security_options = smtp_use_tls = no smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtpd_reject_unlisted_sender = no smtpd_sasl_auth_enable = no smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_use_tls = no strict_8bitmime = no strict_rfc821_envelopes = no transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_domains = hash:/etc/postfix/virtual
Careful with that setting. You might set up a domain as a virtual_alias_domain without realising it.
virtual_alias_maps = hash:/etc/postfix/virtual
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Grin! Here's one of your problems (a very common one): you haven't researched what the command does.
postconf -d : shows the default settings postconf param : shows the actual value of the parameter postconf -n : shows all parameters that deviate from the default
You're right :-) I was in a rush and didn't look into it very deeply.
These are the domains that your postfix server sees as local domains:
mydomain.com linux-tliy.mydomain.com
Valid recipients are in /etc/passwd and /etc/aliases.
What does the logline say about the bounced email?
A couple selected lines (sanitized with IPs, and real email addresses replaced):
Aug 2 13:29:28 linux postfix/smtpd[16770]: NOQUEUE: reject: RCPT from
mxout-137-ewr.ma
ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
virtual_alias_domains = hash:/etc/postfix/virtual
Careful with that setting. You might set up a domain as a virtual_alias_domain without realising it.
virtual_alias_maps = hash:/etc/postfix/virtual
This is leftover from when I was trying to sort out the rejected mail... it's easy to remove or zero out. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
These are the domains that your postfix server sees as local domains:
mydomain.com linux-tliy.mydomain.com
Valid recipients are in /etc/passwd and /etc/aliases.
What does the logline say about the bounced email?
A couple selected lines (sanitized with IPs, and real email addresses replaced):
Aug 2 13:29:28 linux postfix/smtpd[16770]: NOQUEUE: reject: RCPT from mxout-137-ewr.ma ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
: Relay access denied; from= to= proto=ESMTP helo=
Okay, here's a contradiction, I can't explain with the output of "postconf -n". The phrase "relay access denied" is only used, when the domain is not recognized by Postfix as one that Postfix feels responsible for. But "postconf -n" shows that it is included in mydestination. The only explanation I have is that you overrode this with a setting in master.cf. Please show the master.cf.
Aug 2 13:31:07 linux postfix/smtpd[16961]: NOQUEUE: reject: RCPT from mxout-203-ewr.ma ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
: Relay access denied; from= to= proto=ESMTP helo= This only happens when I attempt to send to newly defined aliases, or to the old aliases such as abuse, postmaster etc.
This shouldn't have anything to do with a local alias. It's the domain itself that is not recognized as a local domain. In case of a missing local alias it would say "user unknown in ... table". -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
A couple selected lines (sanitized with IPs, and real email addresses replaced):
Aug 2 13:29:28 linux postfix/smtpd[16770]: NOQUEUE: reject: RCPT from mxout-137-ewr.ma ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
: Relay access denied; from= to= proto=ESMTP helo= Okay, here's a contradiction, I can't explain with the output of "postconf -n".
The phrase "relay access denied" is only used, when the domain is not recognized by Postfix as one that Postfix feels responsible for. But "postconf -n" shows that it is included in mydestination.
The only explanation I have is that you overrode this with a setting in master.cf. Please show the master.cf.
I made one change to master.cf (I've put it up here http://www.digitaldragon.ca/master.cf )... the last line was added: 10025 inet n - n - - smtpd I made this change to convince postfix that it could look outside localhost for the mailserver (based on a lot of reading I did to try and figure out why I could send/receive mail localy, but external failed 100% of the time (could not even telnet to the port). After I made this change, postfix started listening and retrieving/delivering mail for the primary user plus one alias. This one alias thing has really thrown me... I would expect either all aliases to work or none, not one.... I expect it's something I did in the process of trying to get it all working.. but what is the question. As far as I know, I didn't make any other changes... I have tinkered with fetchmailconf and webmin in the process of sorting this out... it's possible I'm inadvertently made another change...
Aug 2 13:31:07 linux postfix/smtpd[16961]: NOQUEUE: reject: RCPT from mxout-203-ewr.ma ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
: Relay access denied; from= to= proto=ESMTP helo= This only happens when I attempt to send to newly defined aliases, or to the old aliases such as abuse, postmaster etc.
This shouldn't have anything to do with a local alias. It's the domain itself that is not recognized as a local domain. In case of a missing local alias it would say "user unknown in ... table".
That's what I expected as well... which has really got me stumped... not even sure what to search on for this. Setting up a local alias is relatively straight forward... I thought :-P C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
A couple selected lines (sanitized with IPs, and real email addresses replaced):
Aug 2 13:29:28 linux postfix/smtpd[16770]: NOQUEUE: reject: RCPT from mxout-137-ewr.ma ilhop.org[IP_ADDRESS_REMOVED]: 554 5.7.1
: Relay access denied; from= to= proto=ESMTP helo= Okay, here's a contradiction, I can't explain with the output of "postconf -n". The phrase "relay access denied" is only used, when the domain is not recognized by Postfix as one that Postfix feels responsible for. But "postconf -n" shows that it is included in mydestination.
The only explanation I have is that you overrode this with a setting in master.cf. Please show the master.cf.
I made one change to master.cf (I've put it up here
I don't see anything in master.cf that would explain this. Please check carefully, if you haven't made an error during your obfuscation of the real addresses. The last possibility is that you forgot to execute "postfix reload" to make Postfix aware of changes in main.cf/master.cf.
http://www.digitaldragon.ca/master.cf )... the last line was added: 10025 inet n - n - - smtpd I made this change to convince postfix that it could look outside localhost for the mailserver (based on a lot of reading I did to try and figure out why I could send/receive mail localy, but external failed 100% of the time (could not even telnet to the port). After I made this change, postfix started listening and retrieving/delivering mail for the primary user plus one alias. This one alias thing has really thrown me... I would expect either all aliases to work or none, not one.... I expect it's something I did in the process of trying to get it all working.. but what is the question.
Port 10025 is the default port to receive mails back after they were filtered by amavisd-new. Though you don't have any content_filter settings to enable the filterung, thus you don't need port 10025 for the moment. Also, there should be several settings on that listener so you don't get a mail loop or reject mails that you have already accepted. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I made one change to master.cf (I've put it up here
I don't see anything in master.cf that would explain this. Please check carefully, if you haven't made an error during your obfuscation of the real addresses.
Will check again... although, I would think that if there was an error there, it would interfere with all mail receipt and delivery, not just some. I obfuscated the IPs and emails simply because I didn't want them archived in perpetuity in the mail archives... I can post the real files to my local webserver and then remove them later. http://www.digitaldragon.ca/main.cf http://www.digitaldragon.ca/mail_log.txt http://www.digitaldragon.ca/master.cf
The last possibility is that you forgot to execute "postfix reload" to make Postfix aware of changes in main.cf/master.cf.
Tried both postfix reload and rcpostfix restart.
Port 10025 is the default port to receive mails back after they were filtered by amavisd-new. Though you don't have any content_filter settings to enable the filterung, thus you don't need port 10025 for the moment. Also, there should be several settings on that listener so you don't get a mail loop or reject mails that you have already accepted.
I'm using 10025 as my mail server port - just in case port 25 is blocked by the ISP - ie I'm not using port 25 for the mail delivery. I can also use port 2525 or.. one of several others that DynDNS has available. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton wrote:
I made one change to master.cf (I've put it up here I don't see anything in master.cf that would explain this. Please check carefully, if you haven't made an error during your obfuscation of the real addresses.
Will check again... although, I would think that if there was an error there, it would interfere with all mail receipt and delivery, not just some.
Okay, according to your log the problem does not appear any more (after the restart of Postfix at 13:36. The only warning left is the missing "postmap /etc/postfix/sender_canonical". Then you shouldn't have any more warnings about older source files.
I obfuscated the IPs and emails simply because I didn't want them archived in perpetuity in the mail archives... I can post the real files to my local webserver and then remove them later.
http://www.digitaldragon.ca/main.cf http://www.digitaldragon.ca/mail_log.txt http://www.digitaldragon.ca/master.cf
That was helpful. I think you changed some settings that were only activated after your restartet Postfix at 13:36.
The last possibility is that you forgot to execute "postfix reload" to make Postfix aware of changes in main.cf/master.cf.
Tried both postfix reload and rcpostfix restart.
It did help. (^-^)
Port 10025 is the default port to receive mails back after they were filtered by amavisd-new. Though you don't have any content_filter settings to enable the filterung, thus you don't need port 10025 for the moment. Also, there should be several settings on that listener so you don't get a mail loop or reject mails that you have already accepted.
I'm using 10025 as my mail server port - just in case port 25 is blocked by the ISP - ie I'm not using port 25 for the mail delivery. I can also use port 2525 or.. one of several others that DynDNS has available.
Then you should probably restrict access to the non-default ports to the relay server that you expect mails from. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Clayton
-
Patrick Shanahan
-
Per Jessen
-
Sandy Drobic