I’ve had three emails in as many days from people wondering how to set up automated archiving in Mail.app, so that messages older than a specific date are moved out of the app and into a separate folder.
Although some other email clients do this (I have a vague memory that Outlook used to ask me about this from time to time), Mail doesn’t.
The only solution I could think of revolved around creating a repeating event in iCal, say once a month, and setting it to run the Archive script from Andreas Amann’s Mail scripts which can export messages in standard mbox format.
But that’s not very automated. You still need to select the mailboxes to export and other bits and pieces.
I asked Andreas Amann who is gobsmackingly clever with AppleScript why this isn’t easier to achieve. He tells me:
The problem is that AppleScript Studio applications themselves are not scriptable so they don’t lend themselves to be run without user interaction. Since my archive script needs the user to select which mailboxes to archive as well as some options for the archive, this won’t work.
Another solution would be to create a rule and then apply that to selected message. However, since you can’t run rules via AppleScript either, this won’t work in an automated, non-interactive way either.
I guess people will have to look at some of the commercial offerings for this (I don’t know whether they support automated or timed archiving though…)
Any ideas? (Non-commercial solutions preferred)
Tags: Apple Mail, applescript, archiving, automated, backup, export, mail.app, rules