How to get off the Spamhaus CSS blocklist: fix reverse DNS
A Spamhaus CSS listing means your IP showed low-reputation sending behavior, and a reverse DNS or HELO mismatch makes a server look worse. Make the PTR, HELO and A record agree, find what sent the flagged mail, look up the IP at check.spamhaus.org, then request removal. If the cause is still active, expect a relisting.
Sohail Hussain11 min readShort answer
- Fix the PTR record, the A record and your server's HELO name so all three agree, then find and close whatever sent the flagged mail (a compromised account, web form or app).
- Only then go to check.spamhaus.org and request removal. CSS delists quickly but relists just as quickly if the problem is still there.
- If all you send is password resets, moving that mail to a transactional SMTP relay is usually less work than keeping a self-hosted server clean.
You ran your IP through Spamhaus and got this: Your IP address is either exhibiting suspect behavior, is misconfigured, or has a poor sending reputation. MXToolbox is also showing "Reverse DNS mismatch" plus banner, TLS and transaction time warnings. Meanwhile your password reset emails are bouncing or landing in spam.
Why you are listed
ZEN combines Spamhaus's free IP-based lists into one lookup: SBL, CSS, XBL and PBL. So "listed on ZEN" always means one of those four, and the one that matters for your fix is the one named on the lookup page.
CSS is the usual one for small self-hosted servers. It is an automatically produced dataset of IP addresses involved in sending low-reputation email. Listings are influenced by mail that looks unsolicited, poor list hygiene, and bad mail sent because of a compromise such as a hacked account, web form or CMS. They are always the result of multiple events and heuristics.
That is why a reverse DNS mismatch on its own is not a satisfying explanation. Spamhaus's own CSS guidance says that the first thing to do for a listed IP is check all technical settings for correctness, and it points out common HELO mistakes such as "localhost.localdomain", "WIN-XYZPDQ01" or "mail". A misconfigured server looks like a spam emitter or a hijacked machine. I can't tell from here which event triggered your listing, and the lookup page may not say either, so treat the causes below as a checklist.
| Likely cause | Symptom | Fix |
|---|---|---|
| PTR, A record and HELO disagree | MXToolbox "Reverse DNS mismatch"; HELO shows localhost or a bare name | Step 2 |
| Compromised account, web form or CMS | Unknown recipients or sudden volume in the mail queue | Step 3 |
| Another host behind the same egress IP | Mail in logs you did not expect; several machines share one address | Step 3 |
| IP is a dynamic or residential range (PBL) | Lookup names the PBL, not CSS | Request PBL delisting only if you really run a mail server there |
| Query came through a public resolver | Bounce says listed, lookup says clean; code 127.255.255.254 | Step 1 |
Step 1: Confirm what is listed
- Open the Spamhaus IP and Domain Reputation Checker at check.spamhaus.org and enter your sending IP. Also enter your sending domain, because domain and IP reputations are related.
- Note which list it names. CSS removals are handled only through that checker.
- Make sure the IP is the one your mail really leaves from. Look at the
Receivedheaders of a bounce or test message, or paste them into the email header analyzer. - If you query ZEN yourself, reverse the IP octets and append
zen.spamhaus.org. The CSS return code is127.0.0.3. Codes in the127.255.255.xrange are errors, not listings;127.255.255.254means the query came through a public or open resolver. Run the query from your own resolver. See Spamhaus's DNSBL usage FAQ for the full list of codes: DNSBL usage.
Step 2: Make PTR, A record and HELO agree
MXToolbox's "Reverse DNS mismatch" means the IP's PTR hostname does not resolve back to that same IP, or the name your server announces differs from it. You want three things true at once:
- The sending IP has a PTR record, for example
mail.example.com. mail.example.comhas an A record pointing back to that same IP.- Your MTA greets other servers with that same name in
EHLO/HELO.
; PTR: set by whoever owns the IP block (your host or ISP)
25.2.0.192.in-addr.arpa. IN PTR mail.example.com.
; A record: set in your own DNS
mail.example.com. IN A 192.0.2.25
For Postfix:
# /etc/postfix/main.cf
myhostname = mail.example.com
smtp_helo_name = mail.example.com
Reload Postfix afterward. On Exim, Exchange or another MTA, set the equivalent greeting name. A HELO/EHLO value should be a fully qualified domain name.
You cannot create the PTR in your own DNS zone. The IP owner controls it: on a cloud provider it is usually a setting on the instance or static IP, and on a VPS or dedicated server it is a control panel field or a support ticket. Verify:
dig -x 192.0.2.25 +short
dig mail.example.com A +short
The first should return mail.example.com. and the second 192.0.2.25. Cached answers can linger until the TTL expires.
Fixing DNS is not the whole job
A clean PTR and HELO make your server look legitimate, but they do not explain why Spamhaus saw suspect mail. If you request removal without finding the cause, expect a quick relisting.
The other MXToolbox warnings
These did not cause the listing, but they shape how receivers judge you.
| MXToolbox warning | What to check |
|---|---|
| SMTP banner check | The 220 banner should show a fully qualified hostname that matches your PTR, not localhost or a bare IP. |
| TLS | Offer STARTTLS with a valid, unexpired certificate for that hostname. |
| Transaction time | Slow SMTP responses often come from slow DNS lookups on the server or high load. Check the resolver the server uses. |
Step 3: Find what sent the flagged mail
A start-up that only sends password resets should have small, predictable volume, so anything else stands out. Check:
- The mail queue and logs. On Postfix, run
postqueue -pand look for recipients and volume you do not recognize. - Web forms and apps. An open contact form, a vulnerable CMS or a leaked SMTP credential can relay spam through your server.
- Shared egress. If several machines leave through one IP, one infected workstation can get the whole address listed.
- Your own bugs. A staging environment, retry loop or notification job that mails real users repeatedly.
- The IP's history. A recycled address may have a bad record from before you had it. I can't confirm that from the listing itself, but ask your host if the IP is new to you.
Rotate any SMTP passwords and API keys you suspect, patch whatever was exposed, and confirm the server is not an open relay. Spamhaus's CSS FAQ points to its Hacked? Here's Help FAQ for dealing with the various reasons for CSS listings.
Step 4: Request removal
Spamhaus is explicit about the order. With a CSS listing you must meet the email sending best practices in RFC 5321/5322 before requesting removal. The checker now has a troubleshooting step for this. Once you have resolved the issues, you submit the verification form; if automatic removal is allowed, nothing more is needed, and if not, the checker raises a ticket and sends you to the Ticket Center. More detail is on Spamhaus's page about troubleshooting your listing.
Two limits to know about. You can request delisting if you are authoritative for the IP and believe the cause is solved. CSS listings normally expire three days after the last spam detection, though chronic abuse can last longer. If you are on a shared or hosted IP you do not control, your provider may have to do this for you.
If the checker names the SBL instead, the route is different: only the network or hosting company can deal with SBL removals, so a general user talks to their ISP.
Never pay for delisting
Spamhaus says there is never a fee for removing any listing, and that anyone offering removal for money is running a scam. Deliverability consultants have no special influence over listings.
Step 5: Publish SPF, DKIM and DMARC
Authentication does not delist you, but password resets from an unauthenticated domain are the first thing receivers distrust. At minimum:
example.com. IN TXT "v=spf1 ip4:192.0.2.25 -all"
Enable DKIM signing in your MTA too. The SPF generator, DKIM generator and DMARC generator build the records, and how to set up SPF, DKIM and DMARC covers the rollout. Start DMARC at p=none, read the reports, and tighten later.
Should you keep self-hosting?
For password resets alone, I'd skip it. PTR control, IP reputation, TLS, patching and blocklist monitoring are ongoing work, and one bad day means users cannot log in.
| Option | Pick it if |
|---|---|
| Keep your own server | You have a clean static IP you control, someone who owns mail operations, and a reason to avoid third parties. |
| Transactional SMTP relay (SMTP2GO, Amazon SES, Postmark, SendGrid and similar) | You want the provider to run the sending infrastructure and handle reputation. You authenticate your domain with SPF and DKIM through them. |
Check each provider's current pricing and terms yourself; they change. Whichever you pick, keep password resets separate from any marketing mail later. The transactional vs marketing emails post explains why.
Checklist before you request removal
- PTR resolves to a hostname, and that hostname's A record returns the same IP.
HELO/EHLOand the220banner use that same fully qualified name.- The queue and logs show only mail you expect.
- Exposed credentials are rotated and the vulnerable app or form is patched.
- The server is not an open relay.
- SPF, DKIM and DMARC are published for the sending domain.
- You checked the domain at check.spamhaus.org as well as the IP.
After delisting
Re-check the IP weekly for the first month and watch queue size and outbound volume, because a sudden jump is the earliest sign of a compromise. Set up Google Postmaster Tools for your domain as well.
See Google Postmaster Tools and suppression list management for the follow-up work.
If nothing works
If removal is refused or the IP relists within days, contact whoever controls the IP: your hosting provider or ISP, and for relays, the relay's support. Spamhaus's own CSS notes say its removals are "fast, no-questions-asked" within limits, so a refusal usually means the checker still sees the problem. Include the listing text from the checker, the MXToolbox report, timestamps, and what you changed.
Subject: Spamhaus CSS listing on {your-ip}, request for help
Hello,
Our IP {your-ip} (mail.example.com) is listed on the Spamhaus CSS/ZEN blocklist.
Checked at check.spamhaus.org on {date and time, timezone}.
What we found: {cause, for example a compromised contact form relaying mail}.
What we changed: {PTR set to mail.example.com, HELO and banner updated,
credentials rotated, form patched}.
Current state: PTR and A record match, SPF/DKIM/DMARC published.
Attached: the Spamhaus listing text, the MXToolbox report, and a sample of mail logs.
Could you check whether the issue is on our IP or the wider range, and
help with removal if needed?
Thank you
Common questions
Is a reverse DNS mismatch enough to get an IP listed on CSS?
Spamhaus does not say it is. It lists many inputs, including unsolicited mail and compromised hosts, so a mismatch is better read as a sign of a misconfigured server than as the single cause.
How long does a CSS listing last?
CSS listings generally expire three days after the last detection, so if the cause is fixed it often clears by itself. Chronic problems can last longer.
The bounce says I am listed, but the checker says I am clean. Why?
Check that you looked up the right IP, from the right sending path. Some receivers query through public resolvers, which Spamhaus answers with the error code 127.255.255.254 rather than a real listing.
Can I just ask Spamhaus to delist me repeatedly?
Self-removals are limited, and CSS will relist an IP immediately if the problem continues to be detected. Fix the cause first and file one request.
Explore: Email Deliverability
Related Articles
550 5.7.1 MailFrom domain is listed in Spamhaus DBL: how to delist
This bounce means the receiving server found your envelope sender domain on the Spamhaus Domain Block List (DBL). Changing your IP won't help. Look the domain up at check.spamhaus.org, find and stop the abuse behind the listing, publish DMARC to see who sends as you, then submit a removal request.
Spamhaus infra -7 domain reputation: what it means, how to fix
A negative infra score such as -2 or -7 is a reputation signal about the infrastructure behind your domain, not a blocklist listing. Reports point to three usual causes: a brand-new domain, a hosting range full of bad neighbors, or an ESP set up for a different domain than your DNS. Check those first.
0x800ccc0e: Outlook Unable to Connect to SMTP Server, Fixed
Outlook error 0x800ccc0e means the app could not open a connection to your outgoing (SMTP) server. Usually the port, encryption setting or password is wrong, or antivirus, a firewall or your ISP is blocking it. Set port 587 with STARTTLS, turn on SMTP authentication, and test again.
SocketLabs "421 4.5.1 Too many errors" blacklist: how to fix it
`421 4.5.1 Too many errors, you have been temporarily blacklisted` means a SocketLabs server saw repeated auth or bad-address errors from your IP and paused it. Stop whatever is retrying, fix credentials and invalid recipients, clear the queue, and wait. The block usually lifts within minutes, but returns if retries resume.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free