May 07, '03 09:40:00AM • Contributed by: SonicMcTails
However, the DontBlameSendmail option allows certian file checks to be overwritten, including Group Writable Directories. This allows Sendmail to work and not make your harddrive read-only. Sendmail's configuration file is very complex so the use of M4 configuration files is recommend. I'm assuming you don't already have a setup M4 file, and you're just starting from scratch. If you already have a file, read the comment at the bottom of this hint. You'll need the Developer Tools installed, and make sure you log in as an admin and then follow the steps in the second part of this hint...
Fixing Sendmail:
-
Open Terminal and change directories to /usr -> share -> sendmail -> conf -> cf
cd /usr/share/sendmail/conf/cf
- Spawn a root login(enter your password when prompted) by typing sudo su. The reason we start a root shell is because redirects don't quite work with sudo (if you try redirecting to a place/file that your normal user can't, you get Permission Denied)
- Copy generic-darwin.mc to system-darwin.mc
cp generic-darwin.mc system-darwin.mc
- Add the DontBlameSendmail line
echo "define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe')dnl" >> system-darwin.mc
[That should be one line]
- Move Apple's sendmail.cf and submit.cf out of the way
mv /etc/mail/sendmail.cf /etc/mail/sendmail.cf.apple mv /etc/mail/submit.cf /etc/mail/submit.cf.apple
- Recreate Sendmail's sendmail.cf and submit.cf
m4 ../m4/cf.m4 system-darwin.mc > /etc/mail/sendmail.cf m4 ../m4/cf.m4 system-darwin.mc > /etc/mail/submit.cf
- Enable Sendmail Daemon Mode
sed "s/MAILSERVER=-NO-/MAILSERVER=-YES-/" /etc/hostconfig > /etc/hostconfig.new && mv /etc/hostconfig.new /etc/hostconfig
[That should be all on one line]
- Start Sendmail
/System/Library/StartupItems/Sendmail/Sendmail start
Now sendmail is running in daemon mode so you can use 127.0.0.1 as an SMTP server.
- Make sure sendmail works by typing telnet 0 25. If you see something like this:
Trying 0.0.0.0... Connected to 0. Escape character is '^]'. 220 nemesis1.local ESMTP Sendmail 8.12.9/8.12.9; Sat, 3 May 2003 21:15:18 -0400 (EDT)
Then you have a working sendmail configuration.
define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe')dnlNote 2: Should Sendmail stop working due to a upgrade of sendmail (Apple upgrades Sendmail from time to time), repeat all steps expect for #3 to fix it.
