[Mimedefang] Using a db for subject lines to block (REJECTSUBJECT)

Jan Pieter Cornet johnpc at xs4all.nl
Tue Jun 21 03:43:51 EDT 2005


On Mon, Jun 20, 2005 at 11:15:10PM -0400, Cormack, Ken wrote:
> The old sendmail rule would do the same thing (whole subjects, or keywords.)
> 
> As far as sendmail ruleset syntax goes, actually, David, it's really not
> that bad at all - probably the simplest sendmail ruleset you'll likely see

You must have a different meaning for "not bad at all" that was previously
unknown to me :)

I've even written rudimentary virus filters and hash table lookups in
sendmail.cf rulesets, but each time I've used that "language", I'm
amazed at how limited and arcane it is, and now complicated it always gets.

> anywhere.  What appears below is a later version of the sendmail rule than
> what most of you have seen before, on this list.  It is the current version
> of the rule I've been using, from which I want to get away from by using
> MIMEDefang.  This version consolidates the two lists I used to use in the
> older version, into one...

Your version is buggy, and this message shows why, but unfortunately
now you likely won't receive it :)

> The main reason I wanted to move the rules to MIMEDefang are these...
> 1.	Updating the original rule required restarting sendmail with a kill
> -HUP, in order to re-load the array of subjects.  Whereas, like access.db,
> the database can be rebuilt on-the-fly with no sendmail restart needed.
> 2.	In the old rule, the entire array populated from the file would
> remain memory resident, and would get bigger in memory and slow to scan
> through, as the file got bigger over time.

How many subjects did you have in there? What did you use this for,
for blocking spam? Was that useful at all?

> 3.	Perl is a lot easier to read than sendmail syntax - far more people
> know it and can support it, than sendmail syntax.

Plus, perl can read in from an external input file that contains no scary
#$@% syntax whatsoever :)

And in perl, it's vastly easier to do it Right :)

-- 
#!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