New User? Register here - Existing Users: Username: Password: [Advanced Login]

 

 

Current Poll

Your preferred Interactive shell?









( 1334 votes ~ 14 comments )

 

Weblog entry #37 for lee

Blocking backscatter with DNSBLs
Posted by lee on Mon 14 Jul 2008 at 19:17

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

Posted by Steve (82.41.xx.xx) on Mon 14 Jul 2008 at 20:29
[ 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.

Steve

[ Parent | Reply to this comment ]

Posted by ajt (195.112.xx.xx) on Mon 14 Jul 2008 at 22:25
[ Send Message | View Weblogs ]

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 ]

Posted by Steve (82.41.xx.xx) on Mon 14 Jul 2008 at 22:32
[ 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.

Steve

[ Parent | Reply to this comment ]

Posted by ajt (195.112.xx.xx) on Mon 14 Jul 2008 at 22:44
[ Send Message | View Weblogs ]

Fair enough, I can see the logic in that.

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by simonw (84.45.xx.xx) on Tue 15 Jul 2008 at 20:49
[ Send Message | View Weblogs ]
Wietse wrote what I regard as pretty much the answer to backscatter for most folk.

http://www.postfix.org/BACKSCATTER_README.html

Should be read by all email admins, not just postfix users.

[ Parent | Reply to this comment ]

 

 

Flattr