[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vps-mail] procmail : about reading info from ASCII files
- Subject: Re: [vps-mail] procmail : about reading info from ASCII files
- From: "Bennett Lanford" <ben@xxxxxxxxxxxxx>
- Date: Sat, 8 Nov 2003 15:53:26 -0000
anon <sikaspam@xxxxxxxxxxx> said:
> We have a lot of recipes that look like this in the condition:
>
> * ^From:.*(name1|name2|name3)
>
> When these start to get long they get hard to maintain.
I use scoring to "OR" conditions. The above becomes:
* 1^0 ^From:.*name1
* 1^0 ^From:.*name2
* 1^0 ^From:.*name3
(My "naughty words" block looks like the above (but without the "^From:.*") I
won't post my naughty words (I don't want spammers to get hold of them), but
they take into account "misspellings" etc. (Where I, L and 1 [one] can be used
interchangeably for i, O and 0 [zero] are used for o, etc., etc., etc.)
> I would really like to see a type of "include" that would read from a file
> with one
> entry per line. For obvious reasons, this would make it easy to write
> code in PHP or any other language to administer such lists.
Using scoring is *almost* like having one entry per line. You just need to
prefix it with "* 1^0". (I realize that the documentation shows ways of using
scores different from 1^0, but for most of my rule sets, I just use 1^0. [I
won't share the ones that use other heuristics ...])
> In the meantime, is there a process-friendly way to replace these
> (x|y|z) with a read of some kind?
* 1^0 x
* 1^0 y
* 1^0 z
--
Bennett Lanford
ben@xxxxxxxxxxxxx
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
======================================================================
Main Index |
Thread Index