Skip to content

AppleScript to automate archiving email from server IMAP folders to local folders while preserving folder structure from server.

Notifications You must be signed in to change notification settings

luposung/MacMailArchiver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

MacMailArchiver

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.

  1. Lets you choose account to archive
  2. Lets you archive emails older than: {"1 month", "2 months", "3 months", "6 months", "9 months", "1 year", "2 years", "3 years"}
  3. Notifies you when it starts archiving a new mailbox
  4. Notifies you every 100 messages archived
  5. Gives you total archived message count

Running the script

  1. Open the script in Script Editor.
  2. Set properites for your mail server.
  3. Save as Application.
  4. Run it and archive your email.
  5. Tested on macOS Sierra

Properties to set in the script

List of mailboxes to ignore on server (not archived)

property mailboxesToIgnore : {"Deleted Messages", "Drafts", "Outbox", "Trash", "Junk", "Apple Mail To Do", "Contacts", "Emailed Contacts", "Chats"}

List of mailboxes which will be have an extenstion appended to the name when archived

property mailboxesToRename : {"INBOX", "Sent"}

Extension to append to renamed mailboxes

property mailboxRenameExtension : "_Archive"

Number of times it will retry archiving an email in case of a failure

property maxFail : 3

Log file name

property logFile : "MacMailArchiver.log"

About

AppleScript to automate archiving email from server IMAP folders to local folders while preserving folder structure from server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • AppleScript 100.0%