Reader Javier Campos is in the market for a new Apple laptop but has concerns about e-mail on his current Mac. He writes:

I’m in the process of deciding which MacBook Pro I’ll purchase to replace my current one. How do I correctly archive (back-up) my e-mail and restore it to my new laptop?

There are a couple of ways to go about this.

When setting up your new MacBook Pro you can simply connect your old Mac to your new MacBook Pro via a FireWire cable and let Migration Assistant do the dirty work. When it migrates your user data from the old Mac to the new one, it will bring along your e-mail.

You can also do the job by archiving your messages within Mail and then transferring those archives to your new MacBook Pro. You do it this way:

Control- (Right) click on the Inbox in Mail and choose Archive Mailbox from the contextual menu. In the sheet that appears you’ll be asked for a destination for saving the exported mailbox files (called “mbox” files). Choose a location and click the Choose button. Mail will create as many mbox files as you have accounts listed under Inbox. So, for example, if you have Gmail, AOL, MobileMe, and AT&T accounts and inboxes for each, Mail will export four mail archives, called INBOX.mbox. INBOX-1.mbox, INBOX-2.mbox, and INBOX-3.mbox. Repeat this procedure for any other mailboxes you’d like to archive—Sent, smart mailboxes, and mailboxes that appear under the On My Mac heading, for example.

Transfer these files to you new MacBook Pro. On that MacBook Pro choose File -> Import Mailboxes in the Mail application. In the Import window that appears, choose Mail for Mac OS X and click the Continue button. In the resulting sheet, select the folder that contains your mailbox archives and click Choose. A list of all the mailbox archives Mail is able to import then appears in the window. Uncheck those you don’t want to import and click Continue. Mail will go about its business of importing the archives and will place them in an Import folder under the On My Mac heading in Mail’s Mailboxes list. At this point you’ll want to click on each mailbox to see what it contains and then rename the mailboxes to accurately reflect the account they’re linked to—AOL Archive, for example.