Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Fixing "550 5.7.1 Service Unavailable — Client Host Blocked Using Spamhaus"

5 min read
17.08.2025

Check If Your IP is Blacklisted

Use one of the following methods to confirm if your IP is blacklisted:

Fix 550 5.7.1 Spamhaus Block
Spamhaus block — fix the cause, then request delisting.

For closely related deliverability/blacklist topics, see BlacklistAlert — Understanding and Resolving Issues, Gmail 550-5.7.1 "Likely Unsolicited Mail", Error 550 SC-001, and check-auth@verifier.port25.com.

Check via Spamhaus Website

  1. Visit: Spamhaus IP Lookup
  2. Enter your server's public IP address (not your local network IP).
  3. Click "Lookup" to see 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.

Check via Command Line (Linux/Mac)

Query Spamhaus's DNSBL directly. Replace YOUR.IP.ADDRESS.HERE with your actual IP:

dig +short YOUR.IP.ADDRESS.HERE.zen.spamhaus.org
  • If the command returns no output, your IP is NOT listed.
  • If it returns an IP address (like 127.0.0.2), your server is blacklisted. The returned code indicates which specific Spamhaus list you're on.
Quick Tip for Shared Hosting Users: If you're on shared hosting, you share an IP with many other users. Contact your hosting provider's support if the IP is blacklisted, as they must initiate the cleanup and delisting process.

Identify Why Your IP is Blacklisted

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.
Linux Hosting
Reliable and fast web hosting!
  • Free domain
  • Modern servers
  • NVMe disks
  • 7-day free trial
Linux Hosting

Remove Your IP from Spamhaus

If your IP is blacklisted, follow these steps in order to request removal.

1. Fix the Root Cause First

Do not request removal before fixing the problem, or you'll be re-listed quickly.

  • Scan for malware: Check your server for unauthorized scripts or compromised user accounts.
  • Stop outgoing spam: Check mail logs (/var/log/mail.log or /var/log/exim/mainlog) for suspicious sending activity.
  • Secure web applications: Ensure contact forms, WordPress sites, etc., are not being abused by spammers.

2. Request Delisting from Spamhaus

  1. Visit: Spamhaus Block Removal Center
  2. Enter your server's IP address.
  3. Click the appropriate removal link (e.g., "Remove an IP from the PBL").
  4. Follow the instructions. For SBL/XBL listings, you may need to explain what the problem was and the steps you took to fix it.

Spamhaus usually processes removal requests within a few minutes to 24 hours.

Secure Your Mail Server to Prevent Future Blacklisting

Check for and Close Open Mail Relays

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
Essential Security: The single most important step to avoid blacklisting is ensuring your mail server is not an open relay and requires authentication for sending mail.

Set Up SPF, DKIM, and DMARC

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"

Implement Email Sending Rate Limits

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

Test Email Deliverability

Once delisted, verify your fixes work.

  1. Send a test email to an external address (e.g., Gmail):
    echo "Deliverability test" | mail -s "Test from Server" your@gmail.com
  2. Check your mail logs for success or new errors:
    sudo tail -f /var/log/mail.log
  3. Use an online tool like Mail-Tester.com to get a detailed spam score and configuration report.

Summary

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!

Frequently asked questions
Three main lists: SBL (manual listing of known spam operations), CBL/XBL (auto-listed from IPs emitting spam right now), PBL (residential/dynamic IP ranges). Look up at lookup.spamhaus.org — it tells you which lists fired and links to the delisting form for each. CBL/XBL auto-delist if you stop emitting; SBL needs a human; PBL is by-range and rarely useful to dispute.
Compromise still active. CBL re-fires within minutes of new spam-shaped traffic from your IP. Find the source: check `mailq`, sent-folder spikes, outgoing SMTP rate. Common: webshell on a compromised CMS sending mail, weak FTP/SSH credentials being brute-forced, or PHP mail() being abused. Don't request another delisting until the bleeding stops.
If your VPS provider's whole subnet is listed PBL because it's consumer-leaning ranges, request the provider to apply for a rDNS-confirmed exemption. Or: send through a transactional relay (SendGrid, Mailgun) whose IPs are explicitly PBL-cleared. Individual PBL exception requests via Spamhaus are slow and often rejected for small senders.
Contact the provider with the bounce text and ask them to (1) find the offending account, (2) shut it down, (3) request Spamhaus delisting. Quality providers do this within hours. If yours doesn't respond fast, for critical outbound mail switch to a transactional relay so the shared IP reputation doesn't block your mail in the meantime.
Related articles
SpamRL: Blocking Malicious Emails
Using method 'mysql_native_password' failed with message: access denied for user
Fixing depth_zero_self_signed_cert in cPanel with a Self-Signed Certificate