Use one of the following methods to confirm if your IP is blacklisted:
If your IP is listed, you'll see details about which list it's on and why it was blocked.
Query Spamhaus's DNSBL directly. Replace YOUR.IP.ADDRESS.HERE with your actual IP:
dig +short YOUR.IP.ADDRESS.HERE.zen.spamhaus.org
127.0.0.2), your server is blacklisted. The returned code indicates which specific Spamhaus list you're on.Spamhaus maintains several blocklists. The lookup results will show which one you're on:
| List | Full Name | Meaning |
|---|---|---|
| SBL | Spamhaus Block List | Your server is verified to be sending spam. |
| XBL | Exploits Block List | Your server is likely infected with malware, acting as an open proxy, or is compromised. |
| PBL | Policy Block List | Your IP is from an ISP's dynamic range (like home broadband) and should not send mail directly to the internet. You should use your ISP's SMTP relay. |
| ZEN | Spamhaus ZEN Aggregate | A combination of SBL, XBL, and PBL. Being on ZEN means you're on at least one of the other lists. |
If your IP is blacklisted, follow these steps in order to request removal.
Do not request removal before fixing the problem, or you'll be re-listed quickly.
/var/log/mail.log or /var/log/exim/mainlog) for suspicious sending activity.Spamhaus usually processes removal requests within a few minutes to 24 hours.
An open relay allows anyone on the internet to send emails through your server, which spammers love.
Quick test:
telnet yourserver.com 25
HELO test
MAIL FROM:<spammer@example.com>
RCPT TO:<victim@external-domain.com>
If the server accepts the RCPT TO for an external domain without authentication, it's an open relay.
For Postfix (Edit /etc/postfix/main.cf):
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
Restart Postfix:
sudo systemctl restart postfix
These DNS records authenticate your emails, greatly improving deliverability and trust.
SPF Record (DNS TXT Record)
Example for a server that only sends mail from its own IP and MX records:
v=spf1 mx a ip4:YOUR_SERVER_IP ~all
DKIM (For Postfix with OpenDKIM)
Generate keys and configure OpenDKIM, then add the public key to DNS:
default._domainkey.yourdomain.com TXT "v=DKIM1; k=rsa; p=YOUR_LONG_PUBLIC_KEY_HERE"
DMARC Record (DNS TXT Record)
Start with a monitoring policy:
_dmarc.yourdomain.com TXT "v=DMARC1; p=none; rua=mailto:reports@yourdomain.com"
Bursts of emails look like spam. Limit outbound sending in Postfix (main.cf):
smtpd_client_message_rate_limit = 100
default_destination_rate_delay = 1s
default_destination_recipient_limit = 50
Restart: sudo systemctl restart postfix
Once delisted, verify your fixes work.
echo "Deliverability test" | mail -s "Test from Server" your@gmail.com
sudo tail -f /var/log/mail.log
| Issue | Fix |
|---|---|
| IP Blacklisted by Spamhaus | Check at Spamhaus, fix the root cause, then request removal. |
| Open Mail Relay Detected | Disable in Postfix/Exim with reject_unauth_destination. |
| Emails flagged as spam | Set up SPF, DKIM, and DMARC DNS records. |
| Sending too many emails | Rate-limit SMTP with default_destination_rate_delay. |
| Test if emails are delivered | Send test emails, check /var/log/mail.log, use Mail-Tester.com. |
By following these steps, your emails should be delivered without Spamhaus blocking your server!