Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

How do I read system mail on my Mac OS X system?

Every now and then I log in to terminal (in OS X) to mess around and stuff but I logged in this time and I got this message to start...

Last login: Fri Apr 21 19:15:30 on console
Welcome to Darwin!
You have mail.
$

Its all good except for the "you have mail" I dont know what mail this is whether it is linked to OS X's mail program (I dont think it is) or whether it is a standard thing. It's not a huge issue, but I wouldnt mind knowing what it's about.


Dave's Answer:

I never really thought about it much, but you're right that 99.9% of the people in the world with Macs have the email programs configured to work with POP mail servers and other off-Mac services, not check the mailbox on the computer itself.

Of course, in the normal operation of your system, it shouldn't be sending you email (though it would be nice if it were to send you status updates), but sometimes you'll find that a system daemon (always running background program) might have something it needs to report, and that's usually what it is.

There are a number of different Unix command-line based email programs, including the Elm Mail System that I wrote many many moons ago, but the best choice with a stock Mac OS X system is Berkeley Mail, also known as mailx.

It's rudimentary, but quite functional for this task. Let me show you, since I happen to have some system email on my main Mac too.

Last login: Sun Apr 30 23:47:44 on ttyp1 Welcome to Darwin! You have new mail.

$ mailx
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/taylor": 1 message 1 new
>N 1 taylor@G5-Desktop.lo Mon May 1 23:00 19/989
    "Cron <taylor@G5-Desktop> "/Library/"
&

Unsurprisingly, it's a message from the cron process which runs all the scheduled administrative tasks. Apparently there was some sort of glitch surrounding the folder "/Library/" and it was sent at exactly 11pm on May first.

To actually read the message, I can either type in the message number in the mailbox (it's "1" in this case) or just press Return:

& 1
Message 1:
From taylor@G5-Desktop.local Mon May 1 23:00:01 2006
X-Original-To: taylor
Delivered-To: taylor@G5-Desktop.local
From: taylor@G5-Desktop.local (Cron Daemon)
To: taylor@G5-Desktop.local
Subject: Cron <taylor@G5-Desktop> "/Library/Application Support/Symantec/Scheduler/SymSecondaryLaunch.app/Contents/schedLauncher " 0 "/Applications/Symantec Solutions/LiveUpdate.app/Contents/MacOS/LiveUpdate" " " "oapp" "aevt" "exAG" "-update LUdf"
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=taylor>
X-Cron-Env: <USER=taylor>
X-Cron-Env: <HOME=/Users/taylor>
Date: Mon, 1 May 2006 23:00:00 -0600 (MDT)

/bin/sh: line 1: /Library/Application Support/Symantec/Scheduler/SymSecondaryLaunch.app/Contents/schedLauncher : No such file or directory

&

Ah, that looks bad. It appears that my Symantec Antivirus program isn't properly installed for some strange reason and when the cron job tries to run the scheduled "schedLauncher" program, it generates the error "No such file or directory."

That's worth knowing, for sure, even if this is a rather convoluted way to learn about the problem.

To delete this message now that I've seen it, I can simply type "delete 1", or if I want to save it to a specific folder, I could use "save ~/Desktop/symantec-error.txt" or similar.

Tip: If you save a message, make sure you specify your Desktop folder so you can find it again (the "~" is a shorthand for your home directory, then "Desktop" is the desktop folder therein). I also suggest you specify a ".txt" rather than ".msg" or ".mbox" or ".eml" or similar: you're not going to need to respond to the message, just have the data so you can print it or forward it along to tech.

It turns out Berkeley Mail has a lot of different features that make it a fast and simple, albeit graphically uninspiring, application. If you're really curious, type "?" at the "&" prompt and you'll see what's therein.

Otherwise, once you've specified that you either want to save the message or messages (by doing nothing), or delete them (with the "delete" command), you can quit with "quit" and the actions will be taken and you're done.

If you're really dying to learn about state-of-the-art Unix interface design from, um, many decades ago, I have good coverage of both Berkeley Mail and Elm in my best-selling book Teach Yourself Unix in 24 Hours.

Hope that helps you out!



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

Thanks. This was great to help read that mail. And, as it was - I had the same issue with Symantec Antivirus

Posted by: Clyde Lovett at December 18, 2007 8:12 AM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]