What the bounce is actually telling you
BASH
# Exim: cPanel path shown. Debian/Ubuntu Exim uses /var/log/exim4/mainlog
grep -Ei 'spamhaus|barracuda|spamcop|blocklist|blacklist|blocked using|listed' /var/log/exim_mainlog | tail -n 20
# Postfix: /var/log/mail.log on Debian/Ubuntu, /var/log/maillog on RHEL-family
grep -E 'status=(bounced|deferred)' /var/log/mail.log | grep -Ei 'spamhaus|barracuda|spamcop|listed|block' | tail -n 20journalctl -u postfix or the Exim unit gives the same lines for you to filter. A blocklist rejection in Postfix typically looks like this:
TEXT
Illustrative output format:
postfix/smtp[12345]: 1A2B3C4D5E: to=<[email protected]>, relay=mx.example.net[198.51.100.10]:25, status=bounced (host mx.example.net[198.51.100.10] said: 550 5.7.1 Service unavailable; client [203.0.113.25] blocked using zen.spamhaus.org (in reply to RCPT TO command))zen.spamhaus.org) tells you which operator to deal with. The client IP in brackets tells you which of your addresses the remote side saw. That second detail leads to the most common mistake.
Find the IP that really sends your mail
/etc/mailips when that option is enabled in WHM. In Postfix, smtp_bind_address decides it. Behind NAT, the public IP the internet sees may not be on any local interface at all. IPv6 also matters: if the server has IPv6 and the receiver accepts it, mail may go out over v6, and that address has its own reputation.
The most reliable check is to trust the evidence. Use the client IP shown in the bounce, or send a test message to an external mailbox and read the topmost Received: header added by the receiving side. Whatever IP appears there is the one to check.
Query the blocklists the right way
203.0.113.25 against Spamhaus, you look up 25.113.0.203.zen.spamhaus.org. If you get no answer (NXDOMAIN), the IP is not listed. If you get an address in 127.0.0.x, it is listed, and the last octet usually tells you which sub-list matched.
BASH
# Replace with the outbound IP you confirmed above
IP='203.0.113.25'
IFS=. read -r a b c d <<< "$IP"
for zone in zen.spamhaus.org b.barracudacentral.org bl.spamcop.net; do
# A record = listed; TXT often explains why
echo "== $zone"
dig +short {d}.{c}.{b}.{a}.${zone} A
dig +short {d}.{c}.{b}.{a}.${zone} TXT
done127.255.255.x range for queries that come through public or open resolvers, and that can look like a listing when it is not. Barracuda may also require the querying DNS server to be registered before it gives real answers. If you get a strange result, check whether it is a resolver problem before you open a delisting request.
For Spamhaus Zen, the last octet helps you focus. Results in the SBL and CSS ranges point to spam actually seen from your IP. XBL usually means the IP showed signs of compromise or malware. PBL is different: it marks address space that the network owner says should not send mail directly, often dynamic or end-user ranges. A PBL hit on a server is a policy issue for the IP owner, not proof that you sent spam.
Ruling out the look-alikes
Delisting and confirming it worked
exim -bpc shows the count on Exim, and postqueue -p lists deferred mail on Postfix. When the deferred messages to the affected providers start delivering and new bounces with the list name stop appearing in the log, you are done.
