Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a huge IMAP email account that contains a lot of subfolders and a lot of messages (dating back to 2005). Is there a simple way to back up these folders and messages so I can delete them from the server?

I would like to retain the ability to browse and manage these archived messages, reply, or add addresses from these messages to my contacts - all preferably within Apple Mail.

If Apple Mail can't do it, what other options do I have?

share|improve this question
    
Would you like to propose how you would access those archives? Would you re-inject them into Apple Mail or would some offline search / browse capability be acceptable? –  bmike Feb 18 at 15:55
add comment

5 Answers

You can do it with offlineimap. I'm using it for my GMail and Fastmail accounts.

Install Homebrew (you must also install Xcode). With Homebrew, brew install offline-imap.

Create ~/.offlineimaprc config file:

[general]
ui = ttyui
accounts = fastmail
maxsyncaccounts = 4
socktimeout = 60

[Account fastmail]
localrepository = fastmail-local
remoterepository = fastmail-remote

[Repository fastmail-local]
type = Maildir
localfolders = ~/Mail/Fastmail

[Repository fastmail-remote]
type = IMAP
remotehost = mail.messagingengine.com
remoteuser = username
remotepass = password

expunge = no
folderfilter = lambda foldername: foldername not in ['INBOX.Trash']

A big advantage of offlineimap is that it creates the folders you have on your IMAP server.

I'm reading my backup with mutt.

share|improve this answer
    
This is awesome. As Mail gets more and more layers of databases, I am sorely tempted to go back to the days when a rock-solid, reliable, text only presentation of text was how I consumed email. –  bmike Feb 18 at 15:51
add comment

In the lefthand sidebox you can just drag mailboxes from the imap location to the On My Mac location.

Otherwise See Mail's help for Archiving mailboxes

Archive the mailbox which puts it on your computer then import the mailbox

I am not certain if the directories are kept,

share|improve this answer
    
It is ON MY MAC Location and just drag a mailbox into it. –  Mark Nov 12 '11 at 12:21
    
If you talk about this one, it is just not there in my apple mail. Once I create one using Mailbox->Create New... it appears, but I still can not drag other mailboxes to it, only individual mails. –  bitbonk Nov 13 '11 at 6:42
add comment

Just to Second, you can drag a folder from your inbox to On My Mac, however expect this process to take a long time if you have a large Mailbox, folder or sub folder, try with one small folder first and have a look at how it progresses the copy, you can do this by clicking on Window>Activity in Mail.

share|improve this answer
add comment

If you can or are willing to make the backup under Windows, IMAPSize enjoyed a very favorable reputation, back when I lived on Windows and frequented a couple of email fora.

share|improve this answer
add comment

You could create a Google mail account, add it to your mail client and drag the folders across. Then you could use gmail to browse all your mail.

share|improve this answer
    
I don't see storing all mail in Gmail as a backup / archive solution. Is there some export function that this would allow? Please expand on how this would allow deletion from the server. –  bmike Feb 18 at 15:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.