On Sat, 2004-02-28 at 06:12, Loren Wilton wrote: > This is more complicated than it looks to do right. > You have to handle several cases. Off the top of my head, all are valid > addresses: > > Joe Foo <[EMAIL PROTECTED]> > "Joe Foo" [EMAIL PROTECTED] > "Joe Foo" <[EMAIL PROTECTED]> > [EMAIL PROTECTED] > <[EMAIL PROTECTED]> > "Joe the-one-and-only Foo" [EMAIL PROTECTED]
They are valid addresses but when I send mail the From field should be what my MUA sets it no? No server relaying the message should alter this, right? When I started using Evolution I set it to: Mertens Bram <[EMAIL PROTECTED]> Later I altered it to: Bram Mertens <[EMAIL PROTECTED]> Am I wrong then to assume that messages containing: "Bram Mertens" <[EMAIL PROTECTED]> bram-mertens <[EMAIL PROTECTED]> are most likely faked? Or could this be altered by some mailing list software or something like that? > You also have to handle > [EMAIL PROTECTED], [EMAIL PROTECTED] Is it possible to have more than one address in the From field? Or are you checking the TO and Cc fields? > After a good deal of work, I came up with the following check for my name, > which so far seems reliable in all cases that I've checked > > header __TO_ME ToCc =~ > /(?:^|\>,|\>|,)\s*(?:\"?Loren.*?\b?Wilton\s*\"?\s*\<[EMAIL > PROTECTED]>?|\<[EMAIL PROTECTED]>?)/ [...] Thanks for thinking about this but again doesn't this check the To and Cc fields? I am looking for someone claiming to be me... As I said above I do have to check two cases so I edited my code to: header LOCAL_TEST_RULE From =~ /(?<!(?:Bram\sMertens)|(?:Mertens\sBram))\s<[EMAIL PROTECTED]>/ score LOCAL_TEST_RULE 0.2 describe LOCAL_TEST_RULE Is someone faking to be me? Doesn't this allow messages with the following From headers? From: Mertens Bram <[EMAIL PROTECTED]> From: Bram Mertens <[EMAIL PROTECTED]> (and off course everything that doesn't contain '[EMAIL PROTECTED]') So it should trigger on: From: "odessa" <[EMAIL PROTECTED]> From: "michael" <[EMAIL PROTECTED]> From: "al" <[EMAIL PROTECTED]> From: "bram-mertens" <[EMAIL PROTECTED]> (and all other variants of this...) TIA -- # Mertens Bram "M8ram" <[EMAIL PROTECTED]> Linux User #249103 # # SuSE Linux 8.2 (i586) kernel 2.4.20-4GB i686 256MB RAM # # 5:01pm up 36 days 20:40, 7 users, load average: 0.12, 0.13, 0.09 #
