4

Does anyone know if it's possible to move a "Mailbox" in Apple Mail to an external drive? I have a relatively small SSD drive, and I'd like to create an Archive mailbox on an external drive.

I don't want to move the entire ~/Library/Mail folder - just the Archive mbox.

If I create a MailBox called MyArchive, I can see the .mbox structure in ~/Library/Mail/V2/Mailboxes/MyArchive.mbox.

Is what I'm trying to achieve do-able? I know there's "proper" mail archiving utilities, but if I could just store the native emails on an external disk, it'd be good enough for me ...

EDIT: As discussed below, I've tried moving this folder to the external drive and creating a symbolic link to it, but with this in place Mail.app doesn't see the mail content in the folder - I can see the list of mail items in the mailbox, but opening any mail in the folder results in a "blank item". I also see the error

kernel[0]: Sandbox: Mail(99229) deny file-read-data /Volumes/External HD/MyArchive.mbox/ (followed by the path to the .emlx)

in Console.app.

Is there any way to "override" Mail.app's sandbox settings to allow it to read mail from the external path?

7
  • If it works on ML but doesn't on Mavericks it is unfortunately off-topic for another week or so.
    – nohillside
    Oct 11, 2013 at 11:07
  • 1
    I've tested it on one of my Mountain Lion Macs and it doesn't work on that either. I'll remove the Mavericks reference if it'll help to get the question off hold :)
    – KenD
    Oct 11, 2013 at 11:52
  • Please add the error message you are getting on ML to the question.
    – nohillside
    Oct 11, 2013 at 12:05
  • Thanks - I've added our experiment with symlinks and the Console error.
    – KenD
    Oct 11, 2013 at 12:36
  • Just an idea: in the Finder, try double-clicking an .emlx file within /Volumes/External HD/MyArchive.mbox/. I suspect this might be a way to convince the sandbox that Mail is allowed to access at least that message, and perhaps the whole folder.
    – Ashley
    Oct 17, 2013 at 21:19

2 Answers 2

1

Q: Do you want this archive to show up in mail, or just be available should you need it?

If you just want to store the messages "offline" but have them around if needed at a later date you can select the mailbox in Mail, then select Mailbox -> Export Mailbox... (make sure you select "Export all subfolders") and save the Archive. Then you can delete the mailbox from mail and pulpit back in when needed.

1
  • Ideally, I'll like to retain the mail in Mail.app - mainly for easy searching (via Spotlight). I've tried a few of the "external archivers" (EagleFiler, for example), but none of them are as fast, seamless or simply as "nice" as being able to search for mail within the native app.
    – KenD
    Oct 17, 2013 at 18:30
0

[Update: When this question was originally posted, the version of OS X was not clear. The following solution works on OS X 10.7 Lion.]

Firstly, have a backup of all your mail in case something goes wrong and you need to restore it.

  • Quit Mail.app if it's open.
  • Copy ~/Library/Mail/V2/Mailboxes/MyArchive.mbox to the external drive (let's say the external volume is called ArchivedMail, making the volume path to the archive /Volumes/ArchivedMail/MyArchive.mbox).
  • Delete the ~/Library/Mail/V2/Mailboxes/MyArchive.mbox folder.
  • Link the external location using the following command in Terminal (under /Applications/Utilities/)

    cd ~/Library/Mail/V2/Mailboxes
    ln -s /Volumes/ArchivedMail/MyArchive.mbox MyArchive.mbox
    
  • Quit Terminal and open Mail.app. You'll see it using the new location for that mailbox (confirm by moving new messages to the archive).

[Note: This worked for me.]

2
  • This is what I originally tried, and although it appeared to work - I can see the list of mail items in the mailbox - opening any mail in the folder results in a "blank item". Can you open and view items that were moved to the mailbox? I also see the error kernel[0]: Sandbox: Mail(99229) deny file-read-data /Volumes/External HD/MyArchive.mbox/ (followed by the path to the .emlx) in Console.app ...
    – KenD
    Oct 11, 2013 at 10:41
  • I think the sandbox settings on OS X 10.8 and later are preventing this from working for me :(
    – KenD
    Oct 18, 2013 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .