On 18 March 2002, Ed Kasky said: > I am in the process of learning regex and have a question if someone has a > minute.... > > Based on the following headers, is this the correct addition to > 20_head_tests.cf? > > header UNDISC_RECIP To =~ /^Undisclosed-Recipient*:\s*;$/ > describe UNDISC_RECIP Valid-looking To "Undisclosed-Recipient"
No, that's wrong. For one thing, it'll match "Undisclosed-Recipientttttt", and it *won't* match "<Undisclosed-Recipient:;>" as in your example spam. Here's my rule for this one: header TO_UNDISCLOSED To =~ /undisclosed[\s\-]+recipients?/i describe TO_UNDISCLOSED To: undisclosed recipients Note that I don't worry about angle brackets, I'm not too concerned about what comes between the two words, and I allow either "recipient" or "recipients". Currently I score this 1.5 because I don't deal with a lot of people using Microsoft Outhouse, which I gather tends to put something like To: undisclosed-recipients:; in email where the sender doesn't want to disclose all the recipients to each other. This is perfectly valid and probably the Right Thing to do, so if a rule like this gets added to SA by default, it should probably score < 1.0. Greg -- Greg Ward - software developer [EMAIL PROTECTED] MEMS Exchange http://www.mems-exchange.org _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk