M
M
Maxim Ryazanov2019-08-12 13:21:54
Mail server
Maxim Ryazanov, 2019-08-12 13:21:54

Why does postfix fail the recipient address check?

Please help.
The usual postfix office mailer. Outside mail only to local clients. Local clients can send anywhere.
Mail outside the office goes fine.
From the inside to the outside world is not sent. Breaks off on check >>> CHECKING Recipient address VALIDATION MAPS <<<
All other checks pass.
The restrictions are:
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_unauth_pipelining,
check_helo_access hash:/etc/postfix/access_helo,
reject_invalid_helo_hostname,
reject_non_fqdn_recipient
Log at the end. But it simply shows that the check failed, and should not pass.
The question is, which option causes some VALIDATION MAPS to pass even when mynetworks and sasl_authenticated pass?
Here is a piece of log:
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: >>> CHECKING Recipient address VALIDATION MAPS <<<
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: ctable_locate: leave existing entry key [email protected][email protected]
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: maps_find: recipient_canonical_maps: [email protected]: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? mypostserver
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost.localdomain
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_list_match: recipient.dom: no match
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: maps_find: recipient_canonical_maps: @recipient.dom: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mail_addr_find: [email protected] -> (not found)
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: maps_find: canonical_maps: [email protected] .dom: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? mypostserver
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost.localdomain
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_list_match: recipient.dom: no match
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: maps_find: canonical_maps: @recipient.dom: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mail_addr_find: [email protected] -> (not found)
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: dict_mysql_get_active: found active connection to host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mysql:/etc/postfix/mysql-virtual-alias-maps.cf: successful query result from host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/ smtpd[2791]: dict_mysql_lookup: retrieved 0 rows
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: dict_mysql_get_active: found active connection to host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mysql:/etc/postfix/mysql-virtual-alias-domain-maps.cf: successful query result from host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: dict_mysql_lookup: retrieved 0 rows
Aug 12 12 :51:41 mypostserver postfix/smtpd[2791]: maps_find: virtual_alias_maps: [email protected]: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? mypostserver
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost.localdomain
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_string: mydestination: recipient.dom ~? localhost
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: match_list_match: recipient.dom: no match
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: dict_mysql_get_active: found active connection to host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mysql:/etc/postfix/mysql-virtual-alias-maps.cf: successful query result from host 127.0.0.1
Aug 12 12:51:41 mypostserver postfix/smtpd [2791]: dict_mysql_lookup: retrieved 0 rows
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: maps_find: virtual_alias_maps: @recipient.dom: not found
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: mail_addr_find: [email protected] -> (not found)
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: NOQUEUE: reject: RCPT from unknown[192.168.0.143]: 550 5.1.1 : Recipient address rejected: recipient.dom; from= to= proto=ESMTP helo=<[192.168.0.143]>
Aug 12 12:51:41 mypostserver postfix/smtpd[2791]: > unknown[192.168.0.143]: 550 5.1.1 : Recipient address rejected: recipient. dom
Aug 12 12:51:42 mypostserver postfix/smtpd[2791]: < unknown[192.168.0.143]: QUIT
Aug 12 12:51:42 mypostserver postfix/smtpd[2791]: > unknown[192.168.0.143]: 221 2.0 .0 Bye

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Ryazanov, 2019-08-12
@Gaernebjorn

smtpd_reject_unlisted_recipient =
By default it was yes, so an additional search was required
In the default postfix config in Debian 10, this parameter is not
found. I found it only by digging in the postfix sources.

A
Alexander Chernykh, 2019-08-12
@sashkets

try adding
smtpd_client_restrictions =
reject_unauth_pipelining,
permit_mynetworks,
reject_unknown_client_hostname, the
permit
smtpd_helo_restrictions =
permit_mynetworks,
reject_invalid_hostname, the
permit
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
and check_helo_access hash: / etc / postfix / access_helo,
should be all the same in smtpd_helo_restrictions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question