'Report Spam' AppleScript for OS X Mail and .Mac

The Problem

You have a .Mac account, and you use Apple's Mail program to manage your email. But lately, you've been getting a lot of spam, and Mail's junk filter isn't quite cutting it. You want to let the .Mac team know about all this spam, so they can crank up the juice on their filters.

The Solution

Download the 'Report Spam' AppleScriptYou download and install this simple AppleScript. Then, every so often, you use it to easily report spammers to .Mac. You sit back, relax, and cross your fingers, hoping that CialisBoy and CheepElektonix won't make it to your Inbox next time.

Installing It

Note: The script assumes that your Mail folders are standard, i.e. that your spam folder is called "Junk", that your deleted messages folder is called "Trash" and so on. If that's not the case, you may have varying degrees of success with this puppy.

  1. Quit out of Mail, if you have it open.
  2. Download this AppleScript file: Report Spam.scpt.zip
  3. Double-click the .zip file to uncompress it.
  4. From your Home folder, open Library, then Scripts.
  5. Drop "Report Spam.scpt" in the Scripts folder (that is, in /Users/username/Library/Scripts/).
  6. Open your Applications folder, and the AppleScript folder within that. Then open the AppleScript Utility application.
  7. Check the box next to "Show Script Menu in menu bar." Notice the little scroll icon that appears in the top-right corner of the screen when you do that.
  8. Quit out of AppleScript Utility, and re-open Mail.

Using It

Backup or sync your email and Address Book contacts with .Mac before running this script. Although the script seems to work perfectly for 99.99% of folks, some configurations cause it to hiccup and delete messages or contacts that it shouldn't. If you can figure out why that happens, let me know, and I'll fix it.

  1. Use Mail to manage your email as you normally would. Be sure to flag any spam in your Inbox as junk mail. Mail will move flagged junk mail into the "Junk" folder.
  2. Every so often, review the items in your Junk folder, just to confirm that they really are junk. (We would hate to inadvertently report Mom as a spammer.)
  3. Go to the new AppleScript menu, and select "Report Spam."
  4. The script will then forward the raw source of every message in your Junk folder to spam@mac.com and spam@uce.gov, the Federal Trade Commission's official spam-report mailbox. Following that, the script will delete all messages in the Junk folder.
  5. That's it! If you want to get fancy, I recommend installing a slick launcher like Quicksilver so you can "report spam" without even using your mouse.

Updates

2009-06-15 - Compressed script file as .zip to ensure proper download.

2007-12-12 - Tested and verified to work with Leopard.

2006-09-26 - The script was featured on the Hawk Wings blog!