Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Instructions for enabling sendmail in 10.2 UNIX
This might be common knowledge already, but I've been able to get sendmail working on two different machines by following the instructions in /etc/mail/README. The catch is getting sendmail to start when starting the machine up. I just changed "MAILSERVER=-NO-" to "MAILSERVER=-YES-" in /etc/hostconfig, and now sendmail works again.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[15,228 views]  

Instructions for enabling sendmail in 10.2 | 12 comments | Create New Account
Click here to return to the 'Instructions for enabling sendmail in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
perms
Authored by: natenate on Aug 30, '02 01:48:33PM

Does anyone know if the old directory permissions problem still exists in 10.2? Has Apple corrected this?



[ Reply to This | # ]
perms
Authored by: carsten on Aug 30, '02 03:30:19PM
Yes the problem is still there in 10.2. I use this script: /System/Library/StartupItems/KeepSendmailHappy/KeepSendmailHappy #!/bin/sh . /etc/rc.common ## # Mail server maintenance ## if [ "${MAILSERVER:=-NO-}" = "-YES-" ]; then ConsoleMessage "Keeping Sendmail happy" 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 ConsoleMessage "Sending unsent mail spool files" # I have some mail sitting in /var/spool/clientmqueue that never # seems to get sent. "mailq -Ac" claims that the queue is empty, # but looking in the directory I see a large amount of held mail. /usr/sbin/sendmail -Ac -q -v fi

[ Reply to This | # ]
perms (DontBlameSendmail)
Authored by: LouieNet on Sep 02, '02 04:24:24AM
Instead of doing "chmod g-w / /etc /etc/mail ", I commented out the following line with a #:
O DontBlameSendmail=safe
and added below it:
O DontBlameSendmail=GroupWritableDirPathSafe
in the /etc/mail/sendmail.cf file. More information on that option and others are available at:
http://www.sendmail.org/tips/DontBlameSendmail.html.

[ Reply to This | # ]
Re: perms
Authored by: StevieD on Nov 06, '02 02:26:34PM

Permission problems must still exist. When I try to start sendmail, I get this...

451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory

However, according to Disk Utility (and my own observation), permissions are fine.



[ Reply to This | # ]
Upgrading to 10.2
Authored by: scottstu on Sep 06, '02 01:03:09AM

I did an upgrade to 10.2 (not a clean install) and found my previous sendmail.cf backed up as /etc/mail/sendmail.cf.applesaved. I simply restored this file, restarted sendmail and was up and running.

-Scott



[ Reply to This | # ]
More perms
Authored by: ssevenup on Sep 11, '02 07:57:41PM

Following the various pointers I have found here I have Sendmail working finally under 10.2 (with caveats).

--I did not alter the canned sendmail.cf

--I did not create an aliases file

--I did not edit the local-host-names file

--I did create a StartUpItems file to keep the various permissions and ownerships the way Sendmail seems to want them.

I was getting errors in my mail.log about group write problems with /Users/user/.forward until I made /Users not group writeable. Things seemed to be functioning otherwise, but I changed the permission on /Users anyway. I hope this does not break anything else. I can received incoming mail via our local mail relay, but only root can send mail from the command line. Judging by the Usenet discussion I read, the Sendmail compile is messed up, and what should be looking for submit.cf is looking for sendmail.cf.



[ Reply to This | # ]
m4
Authored by: stormcrow on Sep 13, '02 06:50:46AM

I don't seem to have the m4 macro preprocessor handy. Can I assume that this is only installed with dev tools?



[ Reply to This | # ]
m4
Authored by: baltwo on Sep 19, '02 04:07:37AM

Check /usr/share/sendmail/conf/m4



[ Reply to This | # ]
jaguar sendmail problems
Authored by: dparvaz on Oct 20, '02 04:31:27PM
Hi, I thought I had this worked out, but all I get when I try to invoke sendmail is the following: % sudo /System/Library/StartupItems/Sendmail/Sendmail start Starting mail services 554 5.0.0 No local mailer defined 554 5.0.0 QueueDirectory (Q) option must be set Any idea how to fix this?

[ Reply to This | # ]
10.2.3 mqueue permissions
Authored by: ssevenup on Dec 23, '02 08:51:40PM

I found that under 10.2.3 I must set /var/spool/mqueue to 777 in the KeepHappy script or I can't even send messages from the command line as a normal user. I also needed to fix the /etc/mail/local-host-names permissions to readable by "other". Apple must have changed things yet again because I had this all working at one time. These issues may have existed on 10.2.2 but we were not testing sendmail while we were running it.

--MM



[ Reply to This | # ]
command line mail in 10.2.3
Authored by: geordie on Jan 08, '03 05:47:34PM

In case someone else has the same problem I am going to document what I did when I needed the ability to send mail from scripts on Mac OS X client. The steps below allowed me to send mail from the command line without any problems.

In terminal issued these commands:
sudo -s
niutil -create . /locations/sendmail
niutil -createprop . /locations/sendmail sendmail.cf /etc/mail/sendmail.cf
hostname >> /etc/mail/local-host-names

Added the following line to /etc/mail/sendmail.cf
O DontBlameSendmail=GroupWritableDirPathSafe

To translate all that into english, as superuser I told sendmail not to use netinfo but to use sendmail.cf instead, put the name of the computer into the list of local machines and then told it to not worry about the fact that the mail directory could be written to by members of the group which owned it.



[ Reply to This | # ]
command line mail in 10.2.3
Authored by: radknee on Jan 20, '03 06:53:06PM

If you'd rather keep strict permissions and not use DontBlameSendmail check this out;
http://www.kung-foo.tv/xtips.php#14



[ Reply to This | # ]