Mittwoch, 8. April 2015

postfix on ubuntu 14.04 send and recieve mails slowly

Was looking why my server seems to always takes about 10 seconds till I can send my email via my client (Thunderbird) after an established connection. Also mail recieving took about 10s till it is delivered. I increased smtpd_tls_loglevel in /etc/postfix/main.cf to 4 and the transfer got stuck at
Apr 8 14:32:15 server postfix/smtpd[23321]: Read 28 chars: RCPT TO:?? Apr 8 14:32:25 server postfix/smtpd[23321]: warning: 1.111.11.111.dnsbl.njabl.org: RBL lookup error: Host or domain name not found. Name service error for name=1.111.11.111.dnsbl.njabl.org type=A: Host not found, try again
Exactly always 10 seconds, strange. So I looked up the error and found out, that the error is the Client reject table in the main.cf. I had there
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
as mentioned on this site then I changed to
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl
so only left the last reject_rbl_client and then it worked without the 10s delay! Not forget to decrease loglevel in /etc/postfix/main.cf back from
smtpd_tls_loglevel = 4
to
smtpd_tls_loglevel = 1