From: Bowie Bailey > > After some experimentation, I came up with this simpler rule. It > should match if your domain shows up in the TO or CC headers and it is > matched to a realname that does not include "mike" or "michael". > > Try it and see what happens > > header __TOCC_MYEMAIL ToCc =~ /[EMAIL PROTECTED]/i > header __TOCC_NOT_MYNAME ToCc !~ /(?:^|,)[,"\s]{0,10}(?:\b(?:mike|michael)\b)?[\s"]{0,10}<[^>@[EMAIL PROTECTED] et>/i > meta NOT_MY_NAME ( __TOCC_MYEMAIL && __TOCC_NOT_MYNAME ) > score NOT_MY_NAME 1
I just realized that this is not quite right. Try this instead: header __TOCC_NOT_MYNAME ToCc !~ /(?:^|,)[\s"]{0,10}(?:\b(?:mike|michael)\b)?[^<]{0,10}<[^>@]{1,[EMAIL PROTECTED] \.net>/i This one specifies that the real name must start with mike or michael, but there may be more text after it. You may even want to specify it a bit more closely by specifying that your first name may only be followed by your last name. That would look like this: header __TOCC_NOT_MYNAME ToCc !~ /(?:^|,)[\s"]{0,10}(?:\b(?:(?:mike|michael)(?: smith)?)\b)?[\s"]{0,10}<[^>@]{1,[EMAIL PROTECTED]>/i Once again, make sure it is all on one line. The only space is before 'smith' (which you should replace with your last name if this is not correct). This regex isn't perfect. It doesn't attempt to pair the quotes and it can be confused by commas inside quoted strings, but it is probably the best you can do without the regex getting hugely complicated. Explanation of the second regex: (?:^|,) Start at the beginning of the line, or at a comma [\s"]{0,10} Zero to ten quotes or whitespace characters (?:\b(?:mike|michael)(?: smith)?\b)? Optionally, Mike or Michael as a single word. If it is there, it can be followed by Smith. You can expand this section to match all common variations of your name. [\s"]{0,10} Zero to ten quotes or whitespace characters <[^>@]{1,30)[EMAIL PROTECTED]> An email address ending with "@ernstoff.net" in angle brackets /i Make it a case-insensitive match Bowie