Migrate UNIX Mail messages to Mail.app

May 21, '04 08:45:00AM

Contributed by: neutrino

I had to migrate from UNIX mailbox on a Linux server to Mail.app. The problem was that the server does not run POP or IMAP. Here is how I did it. First on the Linux server, I did this:

% Mail
Mail>
Mail> s 1,1000 filename
Mail> x
% 
This saves all messages from the first to the one-thousandth in one file. Change the numbers accordingly for your mailbox size. Then, on your Mac, do this in the Terminal:
% cd Library/Mail/Mailboxes/
% mkdir unixmails
% cd unixmails
% scp servername:filename .
Where servername:filename is replaced with the Linux server info. Type in password as requested. After the file is copied, just launch Mail.app, and then you can find all the mails under "On My Mac" in the folder "unixmails."

Now you can even copy all the emails to your IMAP server just by selecting them all and dragging them.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040519131514230