Weblog entry #37 for lee
If you're being deluged by backscatter email, there is a way to block at least some them with Exim using a DNSBL. However you need to treat these sources differently from normal spam sources.
A database of backscatter IPs is available for use via backscatterer.org but, as it warns, you'll want to use it in "SAFE" mode.
Firstly, if you don't already have one, you'll want to add a local ACL file for the RCPT ACL check. On a split config, add something like the following to /etc/exim4/conf.d/00_local_config .
CHECK_RCPT_LOCAL_ACL_FILE=/etc/exim4/local_acl_check_rcpt
Then edit this file, or your local equivalent, and add the following:
deny senders = :
dnslists = ips.backscatterer.org
log_message = $sender_host_address listed at $dnslist_domain
message = Backscatter: $dnslist_text
The trick here is the senders line contains a single colon, which will match the NULL sender used by the vast majority of bounce sources.
If you want to test it out before activating a deny rule, use a warn rule to begin with:
warn senders = :
dnslists = ips.backscatterer.org
log_message = $sender_host_address listed at $dnslist_domain
message = X-Backscatter: $dnslist_text
Update the config with update-exim4.conf and restart the exim daemon to activate.
Note: mail to postmaster is, by default, not affected by locally applied ACLs on a standard configuration. You'd need to make additional changes if you want to block backscatter sources from mailing postmaster - but this is not advised.
Comments on this Entry
[ Send Message | View Steve's Scratchpad | View Weblogs ]
I'm a fan of DNSBLs in general, but I cannot recommend that one in particular.
They block master.debian.org for example - and they expect you to pay €50 to be removed.
Neat idea. Unethical implementation.
[ Parent | Reply to this comment ]
Who do you use then? At the moment backscatter isn't too bad but I've had the occasional deluge in the past 6 months.
--
"It's Not Magic, It's Work"
Adam
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
For blocking backscatter? I don't use anything. I have a procmail rule to catch bounces, by filtering NULL sender envelopes - and that does me good:
# Bounces # :0: *(Return-Path:).*(<>) .Automated.bounces/
Sure it doesn't stop all of them, but I can catch 15,000 on a good week with no effort.
[ Parent | Reply to this comment ]
Fair enough, I can see the logic in that.
--
"It's Not Magic, It's Work"
Adam
[ Parent | Reply to this comment ]
http://www.postfix.org/BACKSCATTER_README.html
Should be read by all email admins, not just postfix users.
[ Parent | Reply to this comment ]