Mini-Tutorial: Backing up Mail.app mail
Old e-mail messages are usually among the neglected components of a healthy backup routine. Despite their general tendency to contain sensitive, important information, and the utility they can serve when searching for old contacts or other data, many users fail to properly preserve previously viewed or sent messages.
In addition, having too many messages in your Mail.app database can cause significant performance issues, both when refreshing the entire list of messages, as well as when performing routine searches of recent items, or even launching and operating within Mail.app.
Here are a few simple solutions for quickly backing up your Mail.app messages.
Copy the ~/Library/Mail folder If you are using a POP account, the simplest method of backing up your Mail.app data is to simply copy the ~/Library/Mail folder (the tilde [~] represents your home user directory) to a separate backup location -- your .Mac iDisk, a CD-R(W), DVD-R(W), an external hard drive, etc.
Your best bet is to perform this process manually by dragging the folder to its new location, as many back tools have been shown to improperly copy Mail.app's data files and folder structure.
If you ever want to restore mail backed up via this method, simply replace the ~/Library/Mail folder on your new Mac OS X installation with the "Mail" folder you've backed up to a separate volume.
If you are using an IMAP account, you can use this method as well, though not all mail will be preserved since items are only cached, not fully stored locally.
One huge advantage of this straightforward method is that all proper tags (date, sender, subject, etc.) will be preserved, and messages will be stored in the standard .mbox format, which is readable by a number of other e-mail clients if you choose to switch away from Mail.app in the future.
Forward messages to a Webmail account If you use a Webmail service with lots of extra capacity (Google's Gmail currently offers 2 GB), you may want to consider forwarding your old messages to this account, and setting up a rule in Mail.app to forward all new messages as they are received.
To set up a new rule, open Mail.apps preferences, and click the "Rules" button. Select "Add Rules." Select "Every Message" from the "If [...] of the following conditions are met:" field, and "Forward Message" from the "Perform the following actions" field.
Once this rule is created, you can either select all the old messages in your Account Inbox and select "Apply Rules" from the "Messages" menu item. Alternatively, you can simply use the "Forward" option.
There are some significant drawbacks to this method, however.
First, the appropriate tags will be lost. All old mail you forward to the Webmail account will have a time stamp of the day it was forwarded, not the accurate time of reception or sending. In addition, all messages will be "from" your own personal e-mail address, so it will be impossible to accurately organize according to sender.
Second, there are some privacy and security issues to consider. Google uses technology that targets ads to users based on the content of e-mail messages. Google does not provide any guarantee for long term existence of Gmail accounts, and in fact discourages automatic forwarding of e-mail.
Still, Google's comprehensive, and fast built-in search functionality pacifies the above complaints to some extent.
Saving/stripping attachments There is an easy method for stripping your inbox of all attachment files, saving them in a separate location rather than allowing them to eat large amounts of disk space on your startup volume.
Simply select all the messages in your inbox and use the "Save Attachments" option in Mail.app's "File Menu." Once you've saved pertinent attachments to an appropriate location, you can again select all messages and select "Remove Attachments," emptying your Trash once the process is completed.
Use a third party utility The application ZOE is an elegant solution for locally backing up messages directly from your server (IMAP included). It has an excellent search function, and its freeware to boot.
ZOE runs as a Java applet in the background, and can be accessed through a browser interface.
Feedback? Late-breakers@macfixit.com.
Like what you've found in this tutorial? Get more troubleshooting guidance (updated daily) by subscribing to MacFixIt Pro.
Resources

stored and shared from any drive. It's incredibly simple mail import function
makes the process easy. I use iData to archive mail and collect bookmarks from
websites in an automatic fashion.
---
abandon cliches
Who makes "iData"??
Thanks
If you use .Mac mail in the Apple Mail program, is it POP, IMAP, or what? In Mail
Preferences it is simply called .Mac Mail.
---
iMac G5, 17", 1.8 GHz, 1GB RAM
PowerBook G4, 12", 1.5 GHz, 768 MB RAM
Both OS 10.4.2
instead? This way (I think) the actual From: and Date: are preserved.
1. I created two new folders (mail boxes) in Mail named "recently In" and
"recently Sent".
2. I wrote an AppleScript that moves all messages in the In box, except those
that are flagged or not yet read to the "recently In" mail box, and all
messages in the Sent mail box to the "recently Sent" mail box. I run that
script daily. (Could even be run automatically.)
3. One a year I burn the "recently In" and "recently Sent" mail folders on a CD
and give the CD a name, such as "2004 e-mail". Then I delete all messages in
the "recently In" and "recently Sent" folders in Mail.
If anybody is interested in the AppleScript I can post it.
I would be interested in seeing your AppleScript that moves mail to the
Recently In and Recently Sent mail boxes.
--
-- Author: James Udo Ludtke
--
-- This script archives Inbox and Sent Mail messages to designated files.
-- Flagged and unread messages are not moved, they remain in the Inbox.
-- The repeat while loop is required in Tiger. It may no longer be required
-- after a future system update.
--
-- If you like, you can comment out the dialogs that say "archiving Inbox",
-- "archiving Sent Mail", and "all done"
--
set runNumber to 1
tell application "Mail"
activate
if not (mailbox named "recently In" exists) then
display dialog "mailbox 'recently In' does not exist" buttons {"OK"}
-- script could be changed here to create the missing mailbox
else
delay 2
-- this delay reduces the probability of having to move items
-- with a second try
-- move all messages, except flagged messages, from in "In" to
-- "Recently In"
repeat while runNumber <= 3
try
set target_mbox to mailbox named "recently In"
set message_count to (count of messages in inbox)
if message_count is greater than 0 then
display dialog "archiving Inbox" buttons {"OK"}
giving up after 2
repeat while (message_count is greater than 0)
set message_to_move to message
message_count in inbox
if flagged status of message_to_move is false
and read status of message_to_move is true then
move message_to_move to target_mbox
end if
set message_count to message_count - 1
end repeat
end if
set runNumber to 10
on error -- do it once more
set runNumber to runNumber + 1
end try
end repeat
end if
-- move all messages, except flagged messages, from in "Sent" to
-- "Recently Sent"
set runNumber to 1
repeat while runNumber <= 3
try
if not (mailbox named "recently Sent" exists) then
display dialog "mailbox 'recently Sent' does not exist"
buttons {"OK"}
-- script could be changed here to create the missing mailbox
else
delay 2
-- this delay reduces the probability of having to
-- move items with a second try
set target_mbox to mailbox named "recently Sent"
set message_count to (count of messages in sent
mailbox)
if message_count is greater than 0 then
display dialog "archiving Sent Mail" buttons {"OK"}
giving up after 2
repeat while (message_count is greater than 0)
set message_to_move to message
message_count in sent mailbox
if flagged status of message_to_move is false
then
move message_to_move to target_mbox
end if
set message_count to message_count - 1
end repeat
end if
end if
set runNumber to 10
on error
-- do it once more
set runNumber to runNumber + 1
-- display dialog "doing Sent Mail run " & runNumber buttons
-- {"OK"} giving up after 2
-- use this dialog to test if second run is required
end try
end repeat
display dialog "all done" buttons {"OK"} giving up after 2
beep
end tell
-- Note: Some command lines in this post spilled over into a second line
-- in the narrow edit column. You will have to remove the line
-- breaks, otherwise you will get compile errors.
tags..."
Perhaps you mean method rather than message in the above quote?
restore method described here is that when you replace your current mail file
with the archived one, you loose everything you've received since the backup
was made.
---
Don't anthropomorphize computers.
They hate that.
account options -> advanced -> keep copies of messages for offline viewing
-> all messages and attachments.
Furthermore, the point of IMAP is to keep mail on the server, so if you lose
your iBook, all your mail doesn't disappear.
For my dotMac, IMAP and POP email I use Apple's Backup.app to backup all the account information from Mail.app to my iDisk. For my POP email accounts, I turn on the setting "leave messages on server" and select a reasonable amount of time (months) before they get automatically deleted.
Since all my email is now always cached on all the different servers, I can rebuild/replace the machine and get the Mail.app config back in place. Once that is done, all of the recent (relavent to me) email will come pouring back in.
This approach is very simple to implement and could potentially work well for dotMac home users that don't have business email retention requirements and there is no additional charge if you already have a dotMac account.
- by gordon227 November 11, 2008 11:04 AM PST
- I think zoe is fantastic. You have created a great walk through. it is really helpful to have the details on how to correctly back up email at your finger tips. You included some really good tools and some really great explanations for a process that if you do not understand you could do completely wrong.
- Like this Reply to this comment
-
(12 Comments)<a href="http://uptobat.com/">Baseball Bats For Sale</a>
<a href="http://uptobat.com/">Cheap Baseball Bats</a>
<a href="http://uptobat.com/cheap-baseball-bats-for-sale">Cheap Baseball Bats</a>