AppleScript to automate archiving email from server IMAP folders to local folders while preserving folder structure from server. A solution to not being able to copy nested mailbox folders.
- Lets you choose account to archive
- Lets you archive emails older than: {"1 month", "2 months", "3 months", "6 months", "9 months", "1 year", "2 years", "3 years"}
- Notifies you when it starts archiving a new mailbox
- Notifies you every 100 messages archived
- Gives you total archived message count
- Open the script in Script Editor.
- Set properites for your mail server.
- Save as Application.
- Run it and archive your email.
- Tested on macOS Sierra
property mailboxesToIgnore : {"Deleted Messages", "Drafts", "Outbox", "Trash", "Junk", "Apple Mail To Do", "Contacts", "Emailed Contacts", "Chats"}
property mailboxesToRename : {"INBOX", "Sent"}
property mailboxRenameExtension : "_Archive"
property maxFail : 3
property logFile : "MacMailArchiver.log"