0

My postfix host is rejecting my client with this message:

4.7.25 Client host rejected: cannot find your hostname, [96.9.90.28].

From the cli on the postfix server, I get this:

root@civicrm:~# host 96.9.90.28
28.90.9.96.in-addr.arpa domain name pointer 28.90.9.96.sinet.com.kh.

So, there is a pointer record. Why would it be rejected.

I then put in a phony hostname in /etc/hosts with the same IP address and the was accepted and email successfully sent.

I then added 96.9.90.28 28.90.9.96.sinet.com.kh to the /etc/hosts file and it was also accepted.

What could be the problem?

1
  • Your email client should be configured to send mail on port 587, not port 25. Jun 13, 2019 at 0:17

2 Answers 2

2

You postfix configuration has reject_unknown_client_hostname which rejects mails because 28.90.9.96.sinet.com.kh. doesn't resolve back to 96.9.90.28.

5
  • What is the process used by this directive to determine that 28.90.9.sinet.kh doesn't resolve back to 96.9.90.28? I thought it just looked for a PTR record
    – Vietyank
    Jun 14, 2019 at 1:56
  • I have a feeling this was a temporary thing (internet in Cambodia can be flaky). I put the directive back in and took the entry in /etc/hosts out and mail is going out without fail.
    – Vietyank
    Jun 14, 2019 at 2:13
  • @Vietyank , my answer contains a link to the postfix documentation which describes what this check does.
    – AlexD
    Jun 14, 2019 at 9:03
  • Yes. I see that. What is the process that causes the name mapping to fail?
    – Vietyank
    Jun 16, 2019 at 2:29
  • @Vietyank the process is the domain name resolution, when DNS server fails to return expected answer then this process fails. In your case DNS servers were returning NXDOMAIN for 28.90.9.96.sinet.com.kh.
    – AlexD
    Jun 16, 2019 at 8:18
0

I was in a similar situation. I had this problematic configuration:

smtpd_client_restrictions =
        reject_unknown_client_hostname

Some years ago I added that rule and was effective to block some spam, but now it was also blocking myself when I was in "strange" locations, even if I was logged-in, with that error (4.7.25 Client host rejected: cannot find your hostname) and that was frustrating.

Some people suggest to just disable reject_unknown_client_hostname. I don't like this solution. I think you can do better and just allow logged-in people.

So here my solution:

smtpd_client_restrictions =
        permit_sasl_authenticated
        reject_unknown_client_hostname

Now I'm not blocked anymore, since I'm already logged-in. I hope this tip can be useful for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .