Mail Services
Email-related daemons can be put into two categories: mail transport agents (MTAs), which send new email messages to their destination machines, and mail delivery agents (MDAs), which send mail that’s landed in a user’s mailbox to that user’s personal computer.
Mail Transport Agents (sendmail)
A mail transport agent sends email to other computers, most often via the SMTP protocol. Mac OS X ships with sendmail , the most common mail-serving program on the Internet.
Tip
Run sendmail only if you need to provide mail-sending services to yourself or your network. You don’t need to run this service to simply send email, so long as there is an SMTP server that will accept connections from your machine; most ISPs provide mail services on their own servers, for example.
Using sendmail
Mac OS X has no easy interface for running
sendmail as a daemon, but it
doesn’t take too much work to get it going, since
most of the setup has already been done for you. Just edit
/etc/hostconfig
, changing the line
MAILSERVER=-NO-
to
MAILSERVER=-YES-
. This line is read by the startup
script at
/System/Library/StartupItems/Sendmail/Sendmail
,
which cleans up the mail queue and starts the sendmail daemon by
issuing the command sendmail -bd -q1h. See Section 13.8 later in this chapter for
more information on how this works. When you restart the machine,
sendmail should start along with it. (You can also test it by simply
running the script from the command line.)
From there, sendmail runs quite ...
Get Mac OS X in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.