I got this error when I tried to send an email to a local user using outlook express, and as an unauthorized person. If I check the option “my server needs authentication” on, and input the correct account information that is set up on postfix server, no error occurs. But I know postfix does not need authorization if the email is destined to the server it manages. So this error should not happen in theory. Searching the Internet, I found posts that recommend to remove the reject_non_fqdn_helo_hostname in smtpd_helo_restrictions. Actually, there is no smtpd_helo_restrictions in my main.cf. There does exist a line:
1 |
smtpd_helo_required = yes |
in the postfix configuration file main.cf. I commented it but still got the error. I added the following lines:
1 2 |
smtpd_helo_restrictions = permit_mynetworks, permit |
, but got no luck. Finally, I fixed the problem by commenting the line reject_non_fqdn_hostname in smtpd_recipient_restrictions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_invalid_hostname, # reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rbl_client dnsbl.sorbs.net, permit |
It turns out that in the phase of checking recipient address, postfix also checks the host name in the HELO command. If it is not a valid FQDN(as is the case for outlook express which uses the hostname of the client machine, not a FQDN), postfix will reject the email. The value of the smtpd_recipient_restrictions parameter also explains why post does not reject email if I turn on the server authentication, because the first option of this parameter is permit_sasl_authenticated.