Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Migrate UNIX Mail messages to Mail.app Apps
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.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,230 views]  

Migrate UNIX Mail messages to Mail.app | 3 comments | Create New Account
Click here to return to the 'Migrate UNIX Mail messages to Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Migrate UNIX Mail messages to Mail.app
Authored by: erickaterman on May 21, '04 10:21:40AM
This is good, but how can I read the unix mail already on my mac with Mail.app, without having to move the /var/mail/ file whenever I want an update? After setting up some new cronjobs recently, I've started getting some, shall we say, "interesting" automated emails from the System, and I'm getting tired of executing

tail /var/mail/<username>
to see what's going on. I tried setting up a symbolic link using

ln /var/mail/<username> ~/Library/Mail/Mailboxes/unixmail
(but otherwise followed your instructions), but no good. Any hints?

[ Reply to This | # ]
Migrate UNIX Mail messages to Mail.app
Authored by: aramis on May 21, '04 10:51:27AM

Try adding this near the top of your /etc/crontab:

MAILTO=you@wherever.com

Doesn't help parse those mail files, but any future cron mail should end up in your mailbox the usual way.



[ Reply to This | # ]
Migrate UNIX Mail messages to Mail.app
Authored by: NrTal on May 21, '04 05:39:16PM

It sounds like you already have a local mail server. Here's how I set up an account to check local mail in Mail.app:

Description: Local Email
Email Address: short user name
Full Name: doesn't matter (I don't send through it)

Incoming Mail Server: localhost
Username: short user name
Password: -password-

FWIW, I used Postfix Enabler to get my local email working, but it sounds like you don't have that problem. However, I used it to enable POP3 - there's certainly a way to do that w/o P.E., but don't ask me how :). Note also that if you don't have root email forwarding in place, you can add another account with root instead of your shortname.

Also note that my computer is behind both a local firewall and my router's firewall from a cable modem, so I have barriers in place against being a relay or what not. I don't know if enabling POP3 would open any holes, but keep it in mind.



[ Reply to This | # ]