Reader Bruce Chrisman would like to better rule his e-mail. He writes:
Recently I’ve received a lot of email in non-Roman script. Is there a way to set up a rule to move messages with non-Roman script to the trash, or better yet just delete it? I have set up rules to look at the subject line to detect some Cyrillic letters. While this helps, it certainly isn’t a very elegant solution and isn’t an effective strategy for Asian scripts.
When seeking ways to effectively sort messages in Mail, you’ll find that Mail’s broad filters are a little limited. However, you can do far more interesting things if you create a new rule, click on the first pop-up menu in the If section, and choose Edit Header List. Do this and you can use any entries in the message’s header to help filter your e-mail.
In the Message Headers window that appears, you’ll see such expected headers as From, To, CC, and Subject. But you can add others by clicking on the Plus (+) button at the bottom of the window. Do that and in the field that appears enter Content-Type and click OK.
Click again on that first pop-up menu and you’ll see that Content-Type appears just below Subject in the list of filters. Choose Content-Type from this menu.
What you want to do now is add character sets from other languages. For example, big5 and gb2312 (Chinese), koi8-r (Russian), and euc-kr (Korean). You may be able to discover the character set for a particular message by selecting it in Mail and choosing View -> Message -> Long Headers. Search for the charset= entry. If you see it, create a condition along these lines:
Content-Type Contains big5
and then move any messages that match that rule to the Junk folder. Add other character sets to this rule as you find them.
The rub is that the majority of spammers that send e-mail using these character sets tuck away this information in the raw message source rather than in the headers. And Mail’s rules won’t search within the raw source of a message. So, you may trap some messages this way, but not all (or even the majority).
Fortunately, anti-spam utilities can see inside the message source and filter messages based on what the source contains. My favorite spam filter, C-Command’s $30 SpamSieve does this with aplomb.
So, the take-away from all this is:
- Mail’s filters are broad.
- You can create more powerful filters by taking advantage of the Edit Header List entry.
- When it comes to trapping and removing spam, this stuff has become so sophisticated that you’re better off using a dedicated tool such as SpamSieve.