Via TUAW I found this Mail.app rule for stopping image spam, where the body of the spam message is in an image and is usually trying to get you to buy penny stocks. Because these messages use images and not actual text, they often evade spam filters.
Having a rule for Mail.app is all well and good if you use a Mac (which I do) and use Mail.app (which I don’t). But thankfully you can also achieve this in Mozilla Thunderbird and it’s no less difficult to do so, either. Here’s how to do it.
In Thunderbird, click on the Tools menu and select ‘Message Filters’. Click on ‘New’ and call it ‘Image Spam’. In the first box, where it says ‘Subject’, select ‘Customise…’ (the last option on the list). In ‘New Message Header’, type ‘Content-Type‘ (exactly as it is written there). Click ‘Add’, and then OK. Now, from the list marked ‘Subject’, choose the newly created ‘Content-Type’ option. Leave the middle box as ‘Contains’ and in the last box type ‘multipart/related‘, all in lowercase.
Now, where it says ‘Perform these actions’, have Thunderbird move the message to your Trash, or to a Junk folder, or whatever you like. I would not suggest ‘Delete Message’, however, as you may miss out on some emails as a result. Then click OK and dismiss the main ‘Message Filters’ dialog.
Important note: This will result in some ‘false positives’ – legitimate email that falls foul of this rule. This is why it is important that you do not delete these on sight and investigate any that are deleted. I tested this on some existing messages in my inbox and several newsletters and press releases got dumped as a result (but not many). You could add an exception to allow any senders in your address book, if you wanted to, to make this less brutal.
I did try to get this working in Outlook Express and Windows Live Mail Desktop Beta, but it won’t allow rules to be tested against custom headers like Content-Type. The full Outlook may allow this, but I don’t have it installed to check.