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.
Recent Comments