You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Robert Menschel <Ro...@Menschel.net> on 2005/12/21 04:09:24 UTC

Re[2]: a rule for just re:

Hello Bowie,

Tuesday, December 20, 2005, 7:22:39 AM, you wrote:

BB> Brian S. Meehan <ma...@meehanontheweb.com> wrote:
>> Somewhere I got a rule for emails with only "Re:" in the subject line.
>> However, I received a valid email and it had a valid subject line with
>> stuff in it but it got marked as meeting the below rule.
>> 
>> header SPAM_RE_SUBJECT_RULE Subject =~ /Re:/i
>> score SPAM_RE_SUBJECT_RULE 2.1
>> describe SPAM_RE_SUBJECT_RULE This looks for subject lines with only re:
BB> in it.

BB> Umm... no it doesn't.

Agreed.

BB> That rule looks for subjects with "re:" in them somewhere.  There is no
BB> restriction on other contents.  Try this one instead:

BB>     header SPAM_RE_SUBJECT_RULE Subject =~ /^\s{0,20}Re:\s{0,20}$/i

BB> It allows optional whitespace before and after the "Re:", but no other
BB> content on the line.

Please correct me if I'm wrong, but I believe in a header rule like
this, and also in a body rule, multiple whitespace is compressed to a
single whitespace, so an equivalent rule should be

>   header SPAM_RE_SUBJECT_RULE Subject =~ /^\s?Re:\s?$/i

Bob Menschel