procmail
[Top] [All Lists]

Re: double negatives

2003-08-12 09:58:41
Scott followed up,

Maybe we're not talking about the same thing.

Oh. I read rather fast and thought from its name that MAXSPAM was the highest score that would be tolerated. So forget what I said about applicability here and let's concentrate on double negatives ...

David, would you mind explaining what this is doing? I follow most of
it, but the

    HOST ?? ^^.|.^^

is unexpected. What does this do? I'm unsure how to read it:

    "HOST begins with a character OR ends with a character"

... a character other than a newline, to be picky ...

is that correct? How does this fit in with subtracting the negative
score?

You're taking it out of context, Scott, as if it were in an unweighted recipe. Consider the difference between these:

 * a

and

 * 1^1 a

The first one means "there must be an `a' in the head." The second means, "score one point for every `a' in the head." It's a difference of "whether at all" versus "how many times." HOST, unless it is only one character long, will have exactly two matches to ^^.|.^^ The first one will score $variable; the second one will score -2 x $variable. The total will be -1 x $variable, whether $variable is positive or negative. I tried it years ago, and it works.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail