More choices for auto-deletion of old mail messages:
Ok, say you're like me in some bizarre way and the choices for automatically deleting old mail messages just sort of grate on your nerves like wet socks. "Never" would fill up your account space quick, and all the other options are for corporate executives. You, however, may actually want to refer to old messages a couple months later without clogging up your account or having to decide which messages might be useful in two months. (Apple, see item #12 here.)

Fig. 1: Mail: The spooty (1) options.
How to fix it:
- Download PrefEdit (it's free).
- Decide on how long you want to keep your old messages; the next time you launch Mail it will automatically delete the messages per your setting. I use 90 days for sent & trash, and 30 days for junk.
- Back up your sent, junk, and trash mailboxes so you can recover if something goes horribly amiss. Yeah right, who does that?
- Open your Mail preferences. (In Mail select the "Mail" menu -> "Preferences...".)
- Click the Accounts icon select an account and click "Edit".
- Click the "Special Mailboxes" tab. (See figure 1.)
- Set "Delete sent messages when:", "Delete junk messages when:", and "Permanently erase deleted messages when:" to "One month old".
- Click "OK", repeat previous two (2) steps for all accounts.
- Close the Preferences, and quit Mail.
- Fire up PrefEdit, it should look like this (figure 2.).:

Fig. 2: PrefEdit: Showing Mail accounts.
- Select "com.apple.mail" -> "MailAccounts" -> "0". If "0" has only about 5 items (figure 3), skip it and go on to "1"

Fig. 3: PrefEdit: Showing a "local" account.
- This is how the account should look (figure 4). Remember where I had you set "One month" in your preferences? That action created the entries for "NumberOfDaysToKeepJunk", "NumberOfDaysToKeepSentMessages", and "NumberOfDaysToKeepTrash". Otherwise you would have to create these entries by hand, and that's not what Macintosh is about. (Neither is this procedure, for that matter.)

Fig. 4: PrefEdit: Showing an account you want to mess with.
- Edit the values for "NumberOfDaysToKeepJunk", "NumberOfDaysToKeepSentMessages", and "NumberOfDaysToKeepTrash" for all your accounts and then simply quit PrefEdit.
- Step 14... there is no step fourteen <-- insert Jeff Goldblum laugh here -- >.
By the way, if you go back into the Mail preference pane, it will show that you delete "Never". As of Mail 1.2, it still deletes the mail with the time you specified in PrefEdit. But if you change the value in the Mail preferences panel, you'll have to do this procedure again.
Beware of Panther's Mail: editing, or even viewing the accounts pane may reset the first account's auto-deletion preferences that you just worked so hard to change.
Last Modified: Tuesday, July 14, 2009
Copyright 2002: Michael Skora