spamassassin-users October 2010 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: Help! Filter spam with "less than&q

Re: Help! Filter spam with "less than" symbol in recipient

From: Bowie Bailey <Bowie_Bailey_at_nospam>
Date: Fri Oct 15 2010 - 14:17:51 GMT
To: users@spamassassin.apache.org

 On 10/15/2010 10:00 AM, Niente0 wrote:
>
> Yet Another Ninja wrote:
>> On 2010-10-15 14:49, Niente0 wrote:
>>
>> works for me
>>
>>
> After some more tests, it seems to work for me too! I discovered that in my
> tests the server added a space after the second quote: "<"(space)<
> while in real spam it was not present.
>
> So here are my 2 new rules:
>
> header TO1 To =~ /^\"\<\"\</
> score TO1 100
>
> header TO2 To =~ /^\"\<\" \</
> score TO2 100
>
> (the second one has the space inside!)

Simplified:

header TO1 To =~ /^"<"\s*</

This will work with or without the space (or multiple spaces, or
tabs...). You don't need to escape anything in this regex. None of
those are special characters.

-- Bowie