Update to Mac OS X Terminal, Part 3
by Chris Stone06/07/2002
The series continues in Learning the Terminal in Mac OS X, Automating Mail from the Mac OS X Terminal, Configuring Email from the Mac OS X Terminal, Customizing the Mac OS X Terminal, and Synchronizing Drives with Cron and the Mac OS X Terminal.
However, none of the first three parts of the series will work in Mac OS X 10.2 (Jaguar) or newer. Jaguar brought several major changes to the OS that require significant changes to the procedure. I'll be posting Jaguar compatible updates to these articles shortly.
As those of you who've updated to Mac OS X 10.1.5 have discovered, sendmail no longer works as described in Learning the Mac OS X Terminal, Part 3. The 10.1.5 version updates sendmail to 8.12.2 from 8.11, and in the process tightened up security considerably.
In short, what you need to do is generate a new sendmail.cf file from scratch, using the m4 "macro language processor." You'll also need to change some permissions, as well as configure your system to run the sendmail daemon at startup. (This was not necessary for sending local mail in 10.1.4 and earlier, but apparently is now).
If you are using sendmail primarily to receive job reports locally from Cron, as described in this tutorial, then the following steps will get you going again. If you are using sendmail to do more than that, then this procedure still might work, but I can't guarantee that.
Also, if you've made any prior changes to your sendmail.cf, you'll need to make them again to the new one you'll generate here. I'll show you how to add the DontBlameSendmail line again.
You'll find some instructions in
/etc/mail/README, which I paraphrase here:Go to
/usr/share/sendmail/conf/cf:cd /usr/share/sendmail/conf/cfCopy the default config file to
yourdomain.mc:sudo cp generic-darwin.mc yourdomain.mc(It’s OK to use the literal "yourdomain" if you don't have a domain for your machine. If you do have a domain, then use it instead.)
If you want to use the
DontBlameSendmailoption as described in the tutorial, then you can add it themcfile here:sudo pico yourdomain.mcAnd add this line to the end of the file:
define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe')dnlRegenerate your
sendmail.cffile from them4file you just edited:m4 ../m4/cf.m4 yourdomain.mc > /tmp/sendmail.cfBack up your old
sendmail.cf:sudo cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.origPut your new
sendmail.cfin place:sudo cp /tmp/sendmail.cf /etc/mail/The new version of sendmail is compiled to look at NetInfo for a pointer to its config file, so you'll need to add that record. So, to ensure that sendmail does not read its config file from NetInfo, execute the following commands:
sudo niutil -create . /locations/sendmail sudo niutil -createprop . /locations/sendmail sendmail.cf /etc/mail/sendmail.cfThis will tell sendmail (when it looks at NetInfo) to not look in NetInfo for its config file, but to look at
/etc/mail/sendmail.cf.-
You'll need to fix the group of the sendmail client queue directory:
sudo chgrp smmsp /var/spool/clientmqueue -
If you're not using the
DontBlameSendmailoption, then you'll need to turn off group-writablity for the root directory again, since the update turns that back on:sudo chmod g-w / -
To have sendmail launch at system startup, you'll need to make two changes in two files.
First open
/etc/hostconfig:sudo pico /etc/hostconfigFind this line:
MAILSERVER=-NO-And change it to this (NO to YES):
MAILSERVER=-YES-Save that file and then open
/System/Library/StartupItems/Sendmail/Sendmail:sudo pico /System/Library/StartupItems/Sendmail/SendmailFind this line near the end:
/usr/sbin/sendmail -bd -q1hAnd add this line after it:
/usr/sbin/sendmail -C /etc/mail/submit.cf -q1hSave that file and restart your machine to allow the startup script to run. You should find that sendmail will work again as it had in 10.1.4. It might turn out that these steps can be simplified further, and I'll keep you posted if that's the case. For now, though, this will at least get you running again.
Chris Stone is a Senior Macintosh Systems Administrator for O'Reilly, coauthor of Mac OS X in a Nutshell and contributing author to Mac OS X: The Missing Manual, which provides over 40 pages about the Mac OS X Terminal.
Return to the MacDevCenter.com.
-
Perl Scripts
2006-01-09 14:55:00 Cruzapete [View]
-
m4 installed only with developer tools?
2003-03-04 15:04:05 anonymous2 [View]
-
m4 installed only with developer tools?
2003-09-08 06:53:41 anonymous2 [View]
-
sendmail and Mac OS X Server
2002-10-01 16:17:23 anonymous2 [View]
-
sendmail and Mac OS X Server
2003-03-31 02:41:04 anonymous2 [View]
-
Still not working for me
2002-09-24 03:10:24 anonymous2 [View]
-
Configuring Sendmail for 10.2.x!
2002-09-23 09:12:11 Chris Stone |
[View]
-
chdir problems
2002-09-22 02:36:29 giedo [View]
-
The sendmail fix with MacOS X 10.2.1
2002-09-21 09:34:14 anonymous2 [View]
-
Jaguar Mail No Unix Mail account option
2002-09-01 00:44:24 Subhash [View]
-
Jaguar Mail No Unix Mail account option
2002-09-03 18:31:42 karmaworld [View]
-
How can we get our reports mailed again?
2002-10-30 01:29:49 Subhash [View]
-
Jaguar Mail No Unix Mail account option
2002-09-03 16:31:39 geoffsaulnier [View]
-
Jaguar Mail No Unix Mail account option
2002-09-04 17:06:59 geoffsaulnier [View]
-
Jaguar Mail No Unix Mail account option
2002-08-25 08:01:47 karmaworld [View]
-
Testing your setup
2002-08-20 18:59:42 magnethead [View]
-
rebooting not necessary
2002-07-22 14:24:52 a3ulafia [View]
-
I think I got it now
2002-07-13 12:03:34 benwillies [View]
-
MySQL No Longer Starts
2002-07-12 23:30:08 toocrued [View]
-
Revert to original files
2002-07-09 15:31:42 nibinc [View]
-
How to delete messages saved in mbox
2002-07-08 21:45:43 sacerdos [View]
-
How to delete messages saved in mbox
2003-05-03 15:47:19 anonymous2 [View]
-
How to delete messages saved in mbox
2003-03-31 03:51:15 anonymous2 [View]
-
How to delete messages saved in mbox
2002-07-13 12:30:50 benwillies [View]
-
How to delete messages saved in mbox
2003-10-02 10:08:49 anonymous2 [View]
-
No more slow go, but no more mail
2002-07-04 05:49:25 bcathey [View]
-
sendmail slowness/host name (localhost) unknown; sleeping for retry
2002-07-01 12:15:17 benwillies [View]
-
sendmail slowness/host name (localhost) unknown; sleeping for retry
2002-07-09 14:43:56 dasper [View]
-
sendmail & real addresses
2002-06-23 10:08:40 dennisj [View]
-
sendmail & real addresses
2003-12-09 11:34:22 anonymous2 [View]
-
sendmail & real addresses
2003-12-09 11:38:33 anonymous2 [View]
-
Startup script doesn't work with OS X Server
2002-06-22 10:39:49 beepbeep [View]
-
Still can't get it to work
2002-06-17 22:46:05 jrperry [View]
-
Still can't get it to work
2002-06-18 19:14:46 jrperry [View]
-
Still can't get it to work
2002-06-18 15:06:07 mike_dowe [View]
-
Simpler fix ?
2002-06-17 16:53:56 mike_dowe [View]
-
Simpler fix ?
2002-06-17 17:12:33 mike_dowe [View]
-
what is a domain in this context ?
2002-06-16 06:21:02 mmurray [View]
-
what is a domain in this context ?
2003-07-21 19:07:16 anonymous2 [View]
-
relaying and php
2002-06-15 16:59:13 theladyboo [View]
-
relaying and php
2002-06-15 20:19:20 jeffulri [View]
-
relaying and php
2002-06-19 22:12:07 theladyboo [View]
-
Works for Me
2002-06-15 09:49:03 David Wheeler |
[View]
-
This Series
2002-06-15 00:52:56 tomp2002 [View]
-
Consequences?
2002-06-13 11:21:31 arunkle [View]
-
I agree
2002-06-14 13:46:17 nirs [View]
-
Consequences?
2002-06-13 12:37:28 Chris Stone |
[View]
-
Sendmail takes 3 minutes to start
2002-06-10 11:44:06 jimlongo [View]
-
Sendmail takes 3 minutes to start
2002-06-13 09:34:53 jiclark [View]
-
Sendmail takes 3 minutes to start
2002-06-13 12:29:17 Chris Stone |
[View]
-
nevermind, sort of...
2002-06-08 15:36:36 jiclark [View]
-
nevermind, sort of...
2002-06-08 21:42:03 jeffulri [View]
-
Help, please...
2002-06-08 15:21:02 jiclark [View]
-
Further Clarification
2002-06-08 12:55:38 jeffulri [View]
-
Further Clarification
2002-06-09 20:39:52 jafager [View]
-
Not using sendmail is not the direction I want to go.
2002-06-10 08:52:48 jeffulri [View]
-
A typo?
2002-06-08 12:35:24 jeffulri [View]
-
A typo?
2002-06-09 20:44:25 jafager [View]
-
A typo?
2002-06-09 14:58:51 Chris Stone |
[View]
-
Not a typo.
2002-06-10 08:23:19 jeffulri [View]
-
This only works after SU'ing first
2002-06-08 12:28:23 jeffulri [View]
-
This only works after SU'ing first
2002-06-13 20:23:50 bradpuett [View]

