You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by jeffsal <je...@charter.net> on 2007/08/13 01:37:04 UTC

RE: SA rule for userid in subject?

I was wondering how to modify Lorens rule for the follwing type of emails
which I have been getting a lot of:

In the subject I get: "some word[s]-userid" or  "some word[s]-some
word[s]-userid"

> >
> >   Loren answered that a month ago. Is in the archives. You may use:
> >
> > header RULE_NAME ALL =~ /\nTo: ([^\@\n]+).+\nSubject:\s*Fw:
> .{0,30}\s*\1\b/i
> >
> >   That covers "Fw: userid" and "Fw: (some word[s]) userid".
> >
> 

-- 
View this message in context: http://www.nabble.com/SA-rule-for-userid-in-subject--tf1261071.html#a12119080
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: SA rule for userid in subject?

Posted by Loren Wilton <lw...@earthlink.net>.
> I was wondering how to modify Lorens rule for the follwing type of emails
> which I have been getting a lot of:
>
> In the subject I get: "some word[s]-userid" or  "some word[s]-some
> word[s]-userid"

You aren't too specific about the subject form, and you aren't specific 
about the To: form.  That leaves lots of room to guess and get things wrong. 
I'm guessing these aren't the fake forwards that were causing the OP 
problems.

You could try something like the following.  It is UNTESTED and may not 
work.

header RULE_NAME ALL =~ 
/\nTo:\s[^\@\n]*[\s<]([^\@>\n]+).+\nSubject:\s[^\n]{0,30}\b\1\b/i

        Loren

>
>> >
>> >   Loren answered that a month ago. Is in the archives. You may use:
>> >
>> > header RULE_NAME ALL =~ /\nTo: ([^\@\n]+).+\nSubject:\s*Fw:
>> .{0,30}\s*\1\b/i
>> >
>> >   That covers "Fw: userid" and "Fw: (some word[s]) userid".
>> >
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/SA-rule-for-userid-in-subject--tf1261071.html#a12119080
> Sent from the SpamAssassin - Users mailing list archive at Nabble.com.