Postfix – how to prove the error 450 4.7.1 <domain.com>: Helo command rejected: Host not found;

kaf asked:

a customer is trying to send me a email but gives in my postfix log:

NOQUEUE: reject: EHLO from mail.domain.pt[xxx.xxx.xxx.xxx]: 450 4.7.1 <otherdomain.pt>: Helo command rejected: Host not found; proto=SMTP helo=<otherdomain.pt>
Jul 21 22:19:50 myserver postfix/smtpd[7978]: disconnect from mail.domain.pt[xxx.xxx.xxx.xxx]

The customer insists that the problem is in my postfix, not on their side but from my understanding, it is a domain configuration problem from their side.
This is part of main.cf:

smtpd_recipient_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        check_client_access hash:/etc/postfix/rbl_override,
        check_sender_access hash:/etc/postfix/sender_access,
        reject_unauth_destination,
        reject_invalid_hostname,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unknown_sender_domain,
        reject_unauth_pipelining,
        permit

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_helo_restrictions =
                 permit_mynetworks,
                 reject_invalid_hostname,
                 reject_unknown_hostname,
                 reject_non_fqdn_hostname

How can i prove that it is a problem on their side? How can i make tests? Usually, when i get this error in the postfix log, is a spam or a fake email. Thank you for your help.

My answer:


The problem is indeed on your customer’s end.

Your Postfix is configured to reject invalid hostnames provided by anything that attempts to deliver mail to it. This is a reasonable measure and prevents a lot of spam.

But, your customer’s mail server connected and provided an invalid hostname in the EHLO greeting. When Postfix tried to look up the hostname, it was unable to find any record of it in the DNS.

The customer needs to configure their mail server to provide a valid hostname in the EHLO/HELO greeting.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.