by RSS Axelle Apvrille  |  Jun 25, 2009  |  Filed in: Security Research

I don't know if you encounter the same problem as I, but I keep on receiving spam from people I however do like (friends, family, etc). You know, the kind of awfully nice people that nonetheless strangely feels compelled to forward their own rubbish: hoaxes, chain letters, petitions, jokes and, of course, a full load of lengthy attachments.

This is a real nuisance, yet I cannot report them to online spam fighting websites, nor simply black list them: from time to time, among other mails, they do send interesting stuff (personal news, cool invitations), and also, they mean no harm, it's just most of the time they are so convinced their e-mail will actually save an endangered specie they feel they have to forward it... Of course, I did try to educate them, telling them all of this was fake, providing URLs to check whether a mail is a hoax or not, explaining their Happy New Year message would be as fine in pure text rather than in a flashy PowerPoint slideshow. Let's face it: I failed. So, I now decided to move on to another solution: the Friendly Automatic Filter and Answering Machine.

The idea is very simple: for all friends/families, 1. Filter out e-mails with banned extensions (in my case: pps, doc, exe, ppt) 2. Also filter e-mails which are too long (ex: people sending images they forget to scale down) 3. Automatically send an e-mail to the sender, telling him part of his message has been blocked and I will not be reading the attachment.

Actually, I spent a long time searching for such a tool on the Internet, but I could not find anything: mail clients such as Thunderbird or Alpine do not support customization of automatic answers (for example, message body containing sender's name and time and date of his email), Gmail filters only detect whether there is an attachment or not, but not which kind, and anti-spam tools are designed to delete the filtered message, not to answer it (indeed, in most cases, you must not answer to spam!) nor to filter out only attachments. I finally started writing a very simple Perl script to handle the case. It's really basic, but it already saves me time.

Interested in trying this yourself? Get the script here.

by RSS Axelle Apvrille  |  Jun 25, 2009  |  Filed in: Security Research