procmail
[Top] [All Lists]

Re: Why Doesn't This Match?

2003-06-19 15:44:57
When I suggested this,

* ^X-Spam-Flag:(.*\<)?YES

Jake Di Toro was up in arms:

How could this possibly hope to match the given header line?? you've
specified that if there isn't a "<" at the end of whatever is in
between the ":" and "YES" then there is *nothing* inbetween.

You speak so cockily, Di Toro, but you are 100% wrong. Read the procmailrc(5) man page. Yes, there is one.

\< and \> are egrep-isms (also used in perl) that mean "start boundary of a word" and "end boundary of a word" respectively. In procmail, they simulate word boundaries but must have a character to match on, so each means "any character, possibly even a newline, that isn't a letter or a digit or an underscore." (.*\<)? means "either nothing, or a string whose last character is neither a letter, a digit, nor an underscore."

In other words, we don't want to match on "X-Spam-Flag: damn your eyes" or "X-Spam-Flag: the Bayesian filter likes it," but "X-Spam-Flag: oh yes, yes, YES, YES!!!" should match.

I've seen this used before (mainly in lines that assume an email
address) ...

And every time you've seen it, you've decided that the explanation is that everyone else is wrong and you alone are right?

... and I haven't understood it there since a bare email address
would make it fail as well.

You haven't understood it because you decided you're exempt from reading the man pages. Your arrogance really burns me up.


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

<Prev in Thread] Current Thread [Next in Thread>