DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Forums
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

Reader Reports 

Receiving Daily System Reports in Mail.app

Introduction

BSD, the UNIX variant OSX is based on, preforms certain cleanup services in the backround every day. A report of what is done is sent to the root user on the system. The following instructions allow Mail.app, the GUI application made by Apple included with OS X, to receive them.

Throughout this document, anything in bold is a command to be entered in the terminal. If it is preceeded by a non-bolded star(*), it must be entered as root, either preceeding the command with sudo and entering your password(which enables root privileges for that command only), or entering su root by itself and entering your password(which puts the terminal into root user mode. Any command entered uses root privileges. To exit type exit.)

NOTE: You'll need to know a little bit about Unix to do this. If your a newbie I can help you get through it. Just email me.

1. Enabling root

The root user must be enabled to receive reports, since that is where it is sent. The root user is called a superuser, and is able to do anything and everything he wants. Apple has disabled it by default, since it is possible to severely corrupt and destroy the entire system. The user that you enter as your name(mjbutch in my case) is an administrator, a more powerful user than others, but not as powerful as root.
To enable root, do ONE of the following:
a. Start the NetInfo Manager app in the Application Folder on your MacOS X hard drive. Select the Domain Menu, move down to Security menu item, and choose the Authenticate submenu item. Enter your user password. Next, go to the same menu and menu item, and choose Enable Root User. Enter the same password as your user password
b. Enter on the command line:
* passwd root
Enter your user password, then enter it again making the same password for root and your username.
c. Restart using the MacOS X CD. Under one of the menu's is an Enable root user similar to choice a above

The root user should be enabled

2. Having the report sent to your user

Normally, the report(and other mail to root) is sent to /dev/null which is a "black hole". Anything sent there is destroyed. This is set by the .forward file in the root user's directory. You'll want this to be sent to your personal user's account.

First, open up Terminal.app(in the Application folder), now enter
cd /var/root
* pico .forward
and. Enter your password. Delete the line /dev/null. Next enter on a new line your user name. Press control-X. Hit Y to save, and return to save it as .forward

Mail should now be sent to forward to your user account

3. Fixing sendmail

Sendmail is misconfigured in the MacOS X release. Sendmail is what sends mail from one account to another on the local machine, and to other systems on the internet. It is needed to allow the system report to be sent. (Thanks to Robert Mohns on the OSX list for his site on getting pine and sendmail working.

Open up Terminal.app(in the Application folder). Enter Next enter the following commands:
* chmod g-w /
* chmod g-w /etc/
* chmod g-w /etc/mail/

Sendmail should work now. test it out by entering
sendmail root
Enter test, press return, then enter a period(.) followed by return. Now type mail, which is a simple builtin mail reader. It should display something other than no mail for ....

4. Enabling Mail.app to read local mail

For the next step, you'll have to get Mail.app to get the local mail. It might take some time and/or finesse to work.

Open up Mail, and choose Preferences... from the Mail menu. Click Accounts if you're not already there. Click on Create Account, and choose Unix Account for the Account type. Enter Local as the Description, and enter your name and email in the respective locations. Enter 127.0.0.1 for SMTP Hostname, and your username and password, which is the same as the MacOS X ones. Next, click Account Options, then enter /var/mail in the box labeled Incoming Mail Directory. Finally, click OK, and quit and relauch Mail.

6. Testing

To test the system, open up the terminal. Enter sendmail root

Enter some words, followed by a dot in a line by itself. Now open up Mail, and check your mail. It should work. If it doesn't, open up the Console application in the Application folder. See if any error messages relating to mail comes up. Also Choose Open Log from the Console menu, and choose mail.log to see more specific messages. If you can't figure it out send me some email and I'd be glad to help you out.

Final Note

Congratulations. You now should get daily system logs in the Local account in Mail. As I said above: If you need any help, send me some email and I'd be glad to help you out.

Revision I- Got rid off the imap server method of getting the system reports, as it is not really needed.

Thanks to the following people for their help:
Robert MohnsHelped with sendmail and pine, and with Unix in general
DarkshadowGave directions for bypassing imap and using Mail.app directly
Roger MorrisGave location to have imap point too(mail subdirectory)
Dennis MunsiePointed out that restart inetd is all that is needed, and that using su instead of multiple su can be used
Fredrik JonssonGave info on using Mail directly instead of imap
jraserPointed out a spelling mistake
Kyle R. GreenPointed out correct directory for imapd, pointed out error in copy, noted that only imap, and not pop is needed
Uli ZappeGave directions for using Mail.app directly, pointed out some steps involving sendmail that weren't needed
Frank CoeFor the tip about Stuffit 5.5

 


Last Updated:12/28/01

Created and Maintained by Matthew Butch- libertyof76@supernet.com

Copyright © 2000-2008 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.