[Mimedefang] Using spamtrap to reject shotgun attempts

Jan Pieter Cornet johnpc at xs4all.nl
Sun Oct 10 17:34:04 EDT 2004


On Sat, Oct 09, 2004 at 01:33:48PM -0700, Kenneth Porter wrote:
> I've got some obsolete addresses that receive nothing but spam. They 
> routinely show up as one recipient in a group of legitimate recipients in a 
> spam attempt, and many of these score low enough to get by. I'd like to 
> reject the entire transaction for all recipients if one of my spamtrap 
> addresses is in the list.
> 
> Alas, filter_recipient only affects the entire message if the action is 
> DISCARD, but not REJECT. Is there some way to keep state here so that the 
> message can be rejected for all recipients if a spamtrap is in the list?

Yes, but you'll have to reject after the DATA phase (this will also allow
you to feed the message to for example dcc or razor as a spam sample).

The only way to maintain state from filter_recipient to filter_end
is via a file in the temporary directory. See "MAINTAINING STATE" in the
mimedefang-filter manpage.

Or easier, do not maintain state, and check the @Recipients array at
filter_end time, and reject there.

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet



More information about the MIMEDefang mailing list