This is driving me nuts… Linux Debian + postfix… /etc/postfix/main.cf has the following lines:

smtpd_recipient_restrictions =
    check_recipient_access hash:/etc/postfix/access,
    reject_rbl_client cbl.abuseat.org,
    reject_rbl_client sbl-xbl.spamhaus.org,
    check_policy_service unix:private/policyd-spf,
    check_policy_service inet:,

These days postfix is rejecting incoming messages from one single IP:

   SMTP error from remote mail server after RCPT TO:<info@domain.ext>:
   host mail.server.ext []: 554 5.7.1 Service unavailable; Client host [] blocked using cbl.abuseat.org; Blocked - see http://cbl.abuseat.org/lookup.cgi?ip=

Well… http://cbl.abuseat.org/lookup.cgi?ip= reports no blacklisting of (obviously the IP is not the real one).

Dozen emails have been blocked so far for the same reason, but each time I manually query the RBL, the IP is reported as clean.

Is postfix caching queries to RBLs? What am I missing?

Thanks in advance for your time.

1 Answer 1


From the top layer perspective, Postfix relies on libc resolver to do DNS lookup (including RBL), so the the behaviour would depends on the library. For example, postfix will alwasy do lookup via NS server defined in /etc/resolv.conf.

If the NS server has caching mechanism, then postfix will get the cache result too. This is also happen if your provider has "DNS hijacking" (the diverted DNS packet into their NS server). In this event, you will also hit their cache (if they enable it).

To check what's the output of DNS lookup, you can use dig command. For example check if IP address was listed in cbl.abuseat.org.

$  dig

; <<>> DiG 9.10.1-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48609
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

If the return is NXDOMAIN, the IP address wasn't listed.

From the bottom layer perspective, each smtpd process has cached its own DNSBL lookup results. Those results are not shared with other Postfix processes. Each smtpd process will be reused until max_use or max_idle reached. When smtpd process dies, the RBL cache will lost too. When new smtpd process was create by master daemon, it will pickup new configuration on main.cf (including max_idle and max_use. So actually no need to restart postfix.

  • 1
    Thanks a lot, that makes sense; I have now flushed the server DNS cache to see if the issue is solved. As far as max_use and max_idle are concerned, I have already tried to restart postfix to no avail (I guess those values are reset upon restart, aren't they?).
    – Gabriele
    May 19, 2015 at 8:23
  • Umm.. What do you mean by restart postfix to no avail?
    – masegaloeh
    May 19, 2015 at 8:34
  • % service postfix restart … messages were still being blocked by some RBL check…
    – Gabriele
    May 19, 2015 at 8:39
  • See updated answer, especially to test if your DNS resolver still cache the result
    – masegaloeh
    May 19, 2015 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.