H2 get sendmail working

James Bond

I have seen the posts here about getting sendmail and tried what I believe to be the sum total of the tips but it still does not work! Error messages in console are below:

Note that my etc/mail/local-host-names is NOT World writable!

At present I only want to use this for local mail so that I can get the output of cron jobs that are mailed. My machine is and the 101 is my internet gateway and DNS (forwarded)....but why is it looking up there?

Is there a *complete* summary of what you need to do and diagnostics?

May 9 18:05:01 localhost sendmail[28302]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: World writable directory

May 9 18:05:11 localhost lookupd[166]: DNSAgent: dns_send_query_server - timeout for

May 9 18:05:31 localhost last message repeated 2 times

May 9 18:05:31 localhost lookupd[166]: DNSAgent: dns_fqdn_query_server - query failed for

Note, the world-writable error concerns all directories up to and including the file, so you need to check:


The error message could be clearer, but oh well. As for the lookupd errors, that's DNS looking something up and timing out. It may not be a problem at all, I see it all the time on mine, without problems (and my DNS server is internal, so I know OS X can talk to it).
1. chmod g-w /
Make root directory not group writable.

2. Edit /etc/hostconfig:
# Not convinced this really does anything, but oh well.

3. Edit /etc/rc.boot:
hostname my.domain.com
domainname domain.com

4. Edit /System/Library/StartupItems/Sendmail/Sendmail:
/usr/sbin/sendmail -bd -q1h
# removed the "&", helps it start on boot

5. Edit /etc/mail/local-host-names

Tell me if I've left anything out. BTW, every time you install one of Apple's MacOS X Updates, you'll have to reset the "/" directory as in step 1.
okay...has anyone figured out why sendmail will send mail anywhere i want it except to the local machine? if i try to send mail to a local user, sendmail pretends like it goes through just fine, when in reality, it doesn't, it just ends up in the queue indefinately.

i think the problem has something to do with /usr/libexec/mail.local ...its not working properly. what sort of dirs and files should i have in the /usr/mail directory?

my /var/mail/mail.log file keeps saying the following:

[date] [time] mail mail.local: lockmailbox /var/mail/[username] failed; error code 75

need help badly...
Is /var/mail group writable?

I think this is needed so that the /var/mail/[user] file can be locked...

I would recommend against using sendmail - too bulky, too insecure, configuration too much like tuning a piano

postfix is a good alternative - builds easily, installs easily, configures easily, runs fine as soon as installed (in my experience, that is). It is more secure than sendmail by all accounts.

Qmail is another good alternative..it is VERY secure and easy to configure.

I use it as an ISP class mail server as well as for 3 people in an office.

It has pop,imap and webmail options. and like most good software is readily available:


So if I want to install qmail, what do I have to worry about in terms of un-installing sendmail? How much stuf has to be removed from where? And are Apple software updates going to play sill buggers with my system?


<i>what do I have to worry about in terms of un-installing sendmail?</i>

This will probably be covered in the documentation for whatever mail program you choose - it was for postfix, qmail should have it described somewhere too. It might not mention that you will likely need to modify or remove the sendmail startupitem though.

<i>are Apple software updates going to play sill buggers with my system? </i>

Almost certainly. Not a bad idea, once you compile, to keep the binaries kicking around for quicker reinstallation, and to take notes about any odd stuff you had to do to install.
The Docs for Qmail do include how to disable sendmail. If this were a Linux system using rpm's you would un-install the rpm (redhat package manager)

Usually updates will try to re-configure your system.

having the compiled binaries is important but having the config file for which TCP services go to which program (inetd.conf or whatever for Darwin) is important when the update tries to switch you back.

You might also have to go back and edit the init files (/etc/rc.d/init.d/ or wherever they are in Darwin) for the startup if it tries to restart sendmail.

And note that every time you do an Apple update, it seems to reset those permission files to group writeable (at a minimum), so every update usually requires 10-15 minutes of going back and hacking out the things it breaks...

FWIW, while not sending local mail myself, I've had no trouble with sendmail. Shrug.

thanks for all the tips.

What if I don't have a domain name associated with my machine/network?

Is is possible to use an IP address? Will the outgoing mail be rejected as non-qualified or whatever?

All I want to do is send the occasional piece of generated email from a perl program.
All I have done for each install of OS X is:

sudo chmod 755 /

I think I got this tip from macosx.com a while back. Each time that you install OS X or upgrade, it changes the permissions on the root directory. I have DSL and NO domain name and I can send myself emails at any time. I just can't reply.
Ok Quick Question:

I only need sendmail to, well well send mail, I'm on Verizon DSL, and have my own domain, and I need my own SMTP to send mail out.

Turning it on in hostconfig works, but at startup OSX take forever to startup.

I'm pretty sure it's tied to localhost not resolving, but since I don't care to recieve email here, does anyone know if I can somehow lose that delay ?



"When the Going gets Weird, Harry Brown II
The Weird turn Pro. "
Hunter Thompson