Tips October 25, 2004 at 11:15 am

Local-only mail on OS X 10.3 Server

Get your server to deliver mail to local accounts without running an SMTP server.

If you’re used to previous version of OSX, you might be dismayed when 10.3 server doesn’t act like you thought it should.I used to run cron jobs and have the output mailed to a local user of the box. No SMTP, no relaying, just local delivery. It was pretty simple once I got the hang of it. Just add a pipe and "mail user"to the end of the crontab line. For example, to see who is logged in at 3:30 AM:


30 3 * * * w | mail arekdreyer

Out of the box, this works fine on Mac OS X. However, it is another story for Mac OS X Server.

On a server, looking at /var/log/mail.log, I see things like:

Oct 24 23:33:30 localhost postfix/pipe[4266]: EFCCE17976E: to=, 
relay=cyrus, delay=1994, status=deferred (temporary failure. Command 
output: couldn't connect to lmtpd: No such file or directory_ 
421 4.3.0 deliver: couldn't connect to lmtpd_ )

I complained to André LaBranche about this, and he pointed me to the solution: just copy main.cf and master.cf from a Mac OS X system to your Mac OS X Server box. These files live in /etc/postfix; make sure you keep the ownership and permissions the way they should be

At the command line, to look at mail, just use the command mail. There are plenty of references out there for that, like the man page for mail.

Or take a look at
the FreeBSD handbook
.

Again, this is for local-only email. You have to log in at the machine to check the mail.

In my opinion, it would be better to configure your machine so it can use SMTP to send mail to a “real” email address that you check, but I thought other old school UNIX admins might find this useful.

About

Arek Dreyer has been an Apple Certified Trainer since 2002. Originally an expert in Sun Systems, Dreyer shifted his professional focus to Mac OS X shortly after it came out. President of Dreyer Network Consultants Inc., Arek has been delivering courses and providing training around the world, both in the classroom and at events like the Apple Channel Camp and the Macworld Conference and Expo. Dreyer also provides integration and troubleshooting services for his own customers and for Apple.

Leave a reply

You must be logged in to post a comment.