A Script Fix for Panther Mail.app Crash Problem


Last week brought an unwelcome time-suck; persistent crashing on the part of Mail.app running under Panther (10.3). As if I don't have enough issues vying for my time right now, Mail.app, began unexpectedly quitting when I attempted to move messages around to different folders (mailboxes), and sometimes all on its own as it was running my collection schedule. I began searching the web for others experiencing this problem, and sure enough, found a thread on Apple's support discussion boards that led me to a solution, for which I have created an AppleScript that should help keep the problem from reoccurring.

As I began to troubleshoot the problem myself, it seemed somehow related to the Junk mailbox and the Mail.app's built-in Junk Mail filter. My suspicions were confirmed when I found a thread on Apple's support discussion boards which indicated that this problem may be a result of Apple's last security update, combined with a new type of spam message that contains no subject or message body information. It's not clear that Apple's security update is really at fault, but the blank spam messages really are related to the problem, and it's interesting that the condition didn't begin to exhibit until after the last security update. At any rate, the object here is not to point fingers, but to resolve the problem.

So, the problem is that a blank spam message causes Mail.app's Junk Mail filter to begin cooking in its own juices and crash the application. The fix for this is in two parts:
  1. Fix the Junk Mail filter so that it stops crashing Mail.app
  2. Delete the blank spam messages before Junk Mail filter ever gets ahold of one.

The first part of the fix is very simple: open Mail > Preferences, click the Junk Mail icon, and then click the Reset button. Done. This has the unfortunate effect of losing all the experience your Junk Mail filter has acquired up until now, and so it's back to "Training Mode" again; but that's better than a continually crashing application!

The second half of the fix is primarily to prevent the problem from reoccurring. Here's what you do:
  1. Download this AppleScript: Shoot Blanks.scpt
  2. Open Mail ยป Preferences and click the Rules icon.
  3. Click "Add Rule."
  4. In the New Rule window, name the new rule "Shoot Blanks."
  5. In the Conditions section, choose "Every Message" from the pop-up menu.
  6. In the Actions section, choose "Run AppleScript" from the pop-up menu, and then click "Choose" to select that script you downloaded in step 1 above.

Once you've completed the above steps, your New Rule window should look like this:


Click OK to save the "Shoot Blanks" rule, and then in the Rules list, drag the new rule up until it is the first rule in the list. This ensures that the rule will execute first, so that it deletes any blank messages before the Junk Mail filter gets them. That's it.

I've been using Mail.app for a couple of days now after implementing the above solution, and so far, read my lips: no new crashes! I hope this also works for you if you're having the problem I've described here. If you're not having this problem, then don't bother implementing this solution. And as always, I provide the above script as a public service, with no promised or implied warranty or guarantee; use it at your own risk.

Posted: Sat - February 21, 2004 at 11:15 AM          


©