home | links | feminist | studies | wishlist | cooking | !blog

recovering Apple Mail .emlx files from a raw disk

recovery is near?

It all starts out so simple: GMX introduces a new level of security long overdue and asks you to use the encrypted POP3 service over port 995 in the future. You try to comply, botch up something while trying to get Apple Mail to connect to your account with the old Setup, so you decide to delete th e old account settings and create a new server with the correct settings.

And suddenly you've lost your inbox, since all Mails not sortd into folders a re kept in the account directory you just deleted.

Solution: grab a large USB disk from your friendly retailer, format it with a FS that can do large files (HFSplus works just fine, thankyouverymuch), sudo sh -c "cat /dev/disk0 > /Volumes/VERBATIM/disk0" and sudo sh -c "recover_emlx.perl < /Volumes/VERBATIM/disk0"

Sheesh, and I don't even use OSX. Disclaimer: that's why the script is only tested on Linux - the perl code is universal, but I have no idea whether Apple ships Digest::MD5 - you might have to sudo perl -MCPAN -e "install Digest::MD5". Other Caveats: don't forget to make the md5 hash list of files not needing recovery with a command similar to find /Users/*/Library/Mail -name "*.emlx" -exec md5sum "{}" ";" > Mail.md5

NB it was just too tempting to draw a red cross icon for the shiny new USB disk ;-)