450 4.7.1 Client host rejected: cannot find your hostname

I have a Postfix/Dovecot email server which fails to deliver emails to some addresses. Here's an example of what is says:

<[email protected]>: host mail.da.net.ua[91.213.154.4] said: 450
4.7.1 Client host rejected: cannot find your hostname, [128.199.39.109] 
(in reply to RCPT TO command)

Here's a relevant (I suppose) excerpt from my etc/postfix/main.cf:

smtpd_recipient_restrictions = reject_unknown_recipient_domain, 
    reject_unauth_pipelining, permit_mynetworks, 
    permit_sasl_authenticated, reject_unauth_destination

Here's a dig output for my IP:

$ dig -x 128.199.39.109

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> -x 128.199.39.109
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61194
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;109.39.199.128.in-addr.arpa.   IN  PTR

;; AUTHORITY SECTION:
39.199.128.in-addr.arpa. 1799   IN  SOA ns1.digitalocean.com. hostmaster.39.199.128.in-addr.arpa. 1419274767 10800 3600 604800 1800

;; Query time: 127 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Tue Dec 23 19:08:05 2014
;; MSG SIZE  rcvd: 112

And for my domain name:

$ dig MX btcontract.com +short @ns1.digitalocean.com
50 mail.btcontract.com.

What's the reason for this strange behavior and how can I fix it?


You need a PTR record that resolves 128.199.39.109 to the hostname of your sending server. Might also want to look into SPF records for your domain too.