Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu Server with Exim4 MTA. Everything is running OK. I must integrate Spam Lists, in Exim4. How can I integrate Spam Lists with Exim4?

One of the Spam List i want to integrate is from Spamhaus.

share|improve this question
up vote 5 down vote accepted

Ok, I just figured out, how it can work.

Edit the file:

vim /etc/exim4/conf.d/main/02_exim4-config_options

Insert the following in bottom of the file:

# Spamhaus RBL

Edit the file:

vim  /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt

Search for:


Then change, "warn" to "deny" as shown below:

# Check against classic DNS "black" lists (DNSBLs) which list
# sender IP addresses
message = X-Warning: $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
log_message = $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)

We must restart Exim:

/etc/init.d/exim4 restart

To test this configuration and see if the PBL blocking is working by sending an email (any email) to:

The system will answer, to tell if your server is correctly blocking PBL-listed IP addresses or not.

share|improve this answer
You can accept your own answer to show that it is the solution to future viewers of this question. – hexafraction Jun 7 '12 at 23:04
for other people seeing this, this won't work if you're using Google or some other open DNS on your server. Essentially you'll find nothing gets blocked. – Tim Tisdall May 29 '15 at 21:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.