5

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.

Seth
  • 57,282
  • 43
  • 144
  • 200

1 Answers1

5

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 zen.spamhaus.org
CHECK_RCPT_IP_DNSBLS = zen.spamhaus.org

Edit the file:

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

Search for:

CHECK_RCPT_IP_DNSBLS

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

# Check against classic DNS "black" lists (DNSBLs) which list
# sender IP addresses
.ifdef CHECK_RCPT_IP_DNSBLS
deny
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)
dnslists = CHECK_RCPT_IP_DNSBLS
.endif

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: [email protected]

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

  • 1
    You can accept your own answer to show that it is the solution to future viewers of this question. – nanofarad Jun 07 '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. http://www.spamhaus.org/faq/section/DNSBL%20Usage#261 – Tim Tisdall May 29 '15 at 21:07