Migrating mail from Evolution on Linux
Migrating mail from one installation of Novel Evolution (formerly Ximian Evolution) to another is possible, but if not done carefully it is easy to lose messages and corrupt files. The simplest method, and the most error prone is probably just to copy the .evolution directory from one machine to another. The problem with doing that is that you will be carrying over all of the internal indices and data files created by Evolution, in addition to the actual mail files. If you are migrating to a different version of Evolution, or if the target installation is already set up with its own data directory, you are very likely going to cause problems. Another method is to select folders and drag them to the desktop, copy them to the target machine, and drag them into the target folder in the new Evolution instance. This works pretty well most of the time, but often the process of dragging folders to the desktop causes messages to be saved without line-breaks between them. On import, these run-in messages will be seen as a single messages, resulting in corruption and possible data loss. A more robust option is to take the actual mbox-format mail files that Evolution is using, copy them to the target machine, and import them by dragging them onto folders in the new installation. In addition to avoiding the problems with the other methods described, this method will also preserve message status as stored in the X-Evolution header. This is also the only method that can be used to migrate to a mail client other than Evolution, such as Mozilla Thunderbird. The following script can be used to copy all of the mbox data files from an Evolution installation into the current working directory.
#!/bin/sh
MAILDIR=${HOME}/.evolution/mail/local
find $MAILDIR -type f -print | \
egrep -v '(index.data|cmeta|summary-meta|ev-summary|ibex.index)' | \
while read MBOX; do
[ -s "$MBOX" ] || continue;
FNAME=`echo $MBOX | \
sed -e "s#$MAILDIR/##g" | \
sed -e 's/\.sbd//g' | \
sed -e 's/\//_/g'`
echo "Backing Up: $FNAME";
cp $MBOX $FNAME
done
A tool like scp or rsync can be used to transfer all of the mailbox files to the target machine where they can be imported one at a time. This script can also be used to back-up a local mail repository for safe-keeping.
Comments
Got something to say?





