I have for a long time been borderline-obsessive about fighting spam with my personal e-mail. Back in the days when I ran my own e-mail system based on Hula (R.I.P.), I had a fairly complex implementation of Spamassassin that worked quite well. When I switched to Google Apps for my home domain several years ago, I started using Postini for spam prevention. It does work pretty well once you tweak it to strike the right balance between too many false positives, and too much spam getting through.
The one thing I missed from my old homegrown setup was the ability to move a message into a “blacklist” folder and have it learned as spam and added to the blacklist by Spamassassin.
One Saturday morning, I decided to do a little research to figure out if Postini had the requisite facilities to allow for this. Lo and behold, I discovered postini-ezcommand-shell.
What follows is a tutorial on setting up a “blacklist” folder in your e-mail that will let you drag spam into the folder and have Postini blacklist the sender automatically.
- You will need some sort of shell account with the ability to run bash and perl scripts, and schedule cron jobs. I use DreamHost.
- fetchmail must be available, or you will have to download and compile it with SSL support.
- Create a folder in your e-mail hierarchy called “Blacklist”. This should work with any e-mail provider/client, but I am using Gmail along with Mail.app on the Mac. You simply need the ability to drag and drop e-mails from your inbox or other folder, to the Blacklist folder.
- All of the scripts and commands below use conventions like “/homedir”. Be sure to adjust all paths for your environment.