If your mail server (HestiaCP + Exim4) suddenly stops receiving emails—especially from Gmail—you might see errors related to Spamhaus blacklist checks. This is a common issue caused by overly strict filtering, and fortunately, it’s quick to fix.
The Problem
You may notice:
- Emails from Gmail or Outlook never arrive
- Exim logs show messages like:
Rejected because is in a black list at zen.spamhaus.orgThis means your server is actively blocking incoming emails based on RBL (Realtime Blackhole List) checks.
Why This Happens
Exim is configured to reject emails immediately (deny) if the sender’s IP appears in Spamhaus.
The problem is:
- Spamhaus sometimes lists shared IP ranges
- Large providers like Gmail use shared infrastructure
- Legitimate emails get blocked unintentionally
The Fix (Quick & Safe)
Instead of rejecting emails outright, you should allow them through and let spam filtering tools handle them afterward.
Backup Your Configuration
Before making changes:
cp /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf.template.bakChange deny to warn
Open the Exim config:
nano /etc/exim4/exim4.conf.templateFind this line:
deny message = Rejected because $sender_host_address is in a black list…Comment it out and replace it with:
warn message = Rejected because $sender_host_address is in a black list…👉 This allows emails to pass through instead of being blocked.
Whitelist Trusted Mail Providers
Add these lines before any blacklist rules:
accept
hosts = *.google.com
accept
hosts = *.outlook.com👉 This ensures emails from major providers are never rejected.
Restart Exim
Apply the changes:
systemctl restart exim4The Result
After applying the fix:
- Gmail and Outlook emails arrive normally
- Spam filtering still works (via SpamAssassin or similar tools)
- No more false-positive rejections
By keeping this approach in mind, you can ensure reliable email delivery while still maintaining effective spam protection.

