How to archive a large IMAP mailbox?

I need to archive a large IMAP mailbox with 46.000 mails dating back to 2008, because I reached the quota of my mail provider.

I have the Mail plugin installed and now want to do this:

  • Archive the complete mailbox
  • delete old mails in the IMAP account

I don’t want to lose any mail so I want to be super sure, before I do anything, that can’t be reversed.

So, here are a couple of questions:

  • Will all my mails from Apple Mail be archived, or only those, I can see in the Import view in DT3? (When I open the mailbox in the Import view in DT3, it only shows 17.000 Mails instead of 46.000 in Mail.)
  • What happens, when I press the “Archive Mailbox”-button again after deleting Mails in the IMAP Mailbox? Will the old Mails be purged or do they stay in the archive?

Thanks

The numbers are the ones provided by Mail but might be inaccurate actually. After importing/archiving the mailbox DEVONthink logs to number of imported and failed emails. You might also want to disable the junk filter to ensure that all emails are imported.

Already imported/archived emails are skipped.

In addition to what @cgrunenberg has sagely suggested, there is a difference between archive and import mail. Read the doc’s.

I’ve done this (for 300K mail). I don’t think you should treat DT as the ‘backup’ solution for your mail when you say: I don’t want to lose any mail. Depending on what provider you use I would first look if it’s possible to download e.g. an mbox backup of your mail. Then you would always have a backup to revert to (or put in cold storage).

My other suggestion would be simply to find an e-mail provider with a larger storage quota if you want to keep your mail online. Fastmail provides 30GB or 100GB storage, depending on your subscription.

3 Likes

I regularly move email to DevonThink Pro, but I don’t use the plug-in. Instead, I use Mail’s mbox export. This works flawlessly for me, with large numbers of email messages with no failures. Perhaps there is something in this method that will help you.

2 Likes

Thanks for your tips.
Actually, what I have done now is, created a new local mailbox in Mail and moved a couple of years worth of emails there.
This way I can search in my emails like I used to, at least on the Mac.

To be save, I stored a copy of the mbox folder.
Maybe I’ll import them to DEVONthink some day. I’ll see.