What the message looks like
554 5.7.1 Service unavailable; Client host [203.0.113.10] blocked using zen.spamhaus.orgCommon causes
- A compromised mailbox or web form sent spam through your server.
- The IP is in a dynamic range (Spamhaus PBL) and is not supposed to deliver directly.
- Shared IP: another customer on the same IP caused the listing.
- On your own server: DNSBL lookups go through public resolvers (8.8.8.8), Spamhaus returns error codes and every mail gets rejected.
Check
- Check the IP at Spamhaus (octets reversed)
- Find blocklist rejections in the log
- Find accounts with suspiciously many logins/mails
journalctl -u postfix --since today | grep -o 'sasl_username=[^ ,]*' | sort | uniq -c | sort -rn | head - Which resolver is used for DNSBL lookups?
cat /etc/resolv.conf
Fix
- Stop the source first: lock the account, change the password, secure the form, delete spam from the queue.
- Only then request delisting from the list operator – otherwise the next listing follows.
- For a PBL listing, relay through a smarthost with a clean IP or use a static IP with a proper PTR.
- For your own DNSBL checks, run a local resolver (e.g. Unbound) instead of public DNS.
- Add per-account outbound rate limits so one hijacked account cannot send thousands of mails.
Typical scenario
A customer reports that mail to a business partner keeps bouncing. The bounce contains '554 5.7.1 Service unavailable; Client host [203.0.113.10] blocked using zen.spamhaus.org' and a lookup link. The server was only recently ordered from a VPS provider. First open the Spamhaus lookup for the IP and read which sub-list it is on: a PBL listing concerns the IP range, not your behaviour, while an SBL or XBL listing points to spam or an infection.
FAQ
What does a 127.255.255.254 answer from Spamhaus mean?
It is not a listing but an error: the query came through a public or open resolver that Spamhaus does not answer.
How long does delisting take?
For Spamhaus SBL/XBL usually minutes to hours after the request, as long as the spam has stopped. Some lists also expire automatically after a few days.
What does a PBL entry at Spamhaus mean?
The Policy Block List covers IP ranges from which direct mail delivery is not normally expected, such as consumer connections. It is not an accusation against you. You then send through your provider's relay or ask Spamhaus to remove a fixed IP.
Does a listing mean my server sent spam?
Not necessarily. The IP may carry a previous owner's history or sit in the range of a noisy neighbour. Still check mailq and the mail log for unusual senders, since a compromised account is the most common genuine cause.
How long until the IP is clean again?
It depends on the list. Some entries expire on their own once the evidence stops, others stay until you have fixed the cause and requested removal. The lookup page states the conditions.