sendmail


Resources:

Short note on configuring sendmail on Mac OS X

After setting MAILSERVER=-YES- on /etc/hostconfig, change /System/Library/StartupItems/Sendmail/Sendmail to read:

StartService ()
{
    if [ "${MAILSERVER:=-NO-}" = "-YES-"]; then
        if ! pid=$(GetPID sendmail); then
            ConsoleMessage "Starting mail services"

            ##
            # Remove junk from the outbound mail queue directory and start up
            # the sendmail daemon. /usr/spool/mqueue is assumed here even though
            # it can be changed in the sendmail configuration file.
            ##
            queue=/var/spool/mqueue
            rm -f ${queue}/nf* ${queue}/lf*

            ##
            # Reset permissions
            ##
            chmod g-w / /etc /etc/mail
            chmod 2555 /usr/sbin/sendmail
            chown smmsp.smmsp /var/spool/clientmqueue
            chmod 700 /var/spool/mqueue
            chown root.wheel /etc/mail/submit.cf

            /usr/sbin/sendmail -bd -q1h
            /usr/sbin/sendmail -C /etc/mail/submit.cf -q1h
        fi
    fi
}