Configuring sendmail on Jaguar
Subject:   Configuring PHP on Jaguar with
Date:   2002-10-31 19:57:14
From:   edwardd20
Response to: sendmail for PHP

Configuring sendmail on Jaguar with (

For those who wish to pursue sendmail on Mac OS X 10.2 (Jaguar) (do Europeans refer to it as 10,2?), here is what I did:

I finally got sendmail working but not with PHP which was my real goal. I’m not sure all of this was necessary but it is what I had at the end.

I don’t have a domain registered at my home. I was simply trying to use PHP for outgoing mail.

Ignore all of the angle brackets and simply put in the proper values.

I ended up working the the following command in the terminal:
sendmail -v -f<from email> <to email> < ~<homedir>/message

This sent a message from <from email> to <to email>.

In my /etc/mail/authinfo file: “U:<userid>” “P=<password>” “” “M:PLAIN LOGIN”

In my /etc/mail/access file:
192.168.0 RELAY
192.168.1 RELAY RELAY

I didn’t end up using the alias file but I created one anyway that was empty.

I added to the ./update file mentioned in the article to add the following to the end:

if [ /etc/mail/authinfo -nt /etc/mail/authinfo.db ]
echo Updating authinfo
makemap hash /etc/mail/authinfo < /etc/mail/authinfo

For those of you, like me, who are prone to making typo’s, watch for the word “then” in the if/fi structure. I left it out and it took me 15 minutes to figure it out.

In the /etc/mail/ file, there are 2 different single quote characters. The one that starts parameters is the wierd one to the left of the one (1) key on my keyboard. The normal single quote key is what ends parameters. Also, you can’t use the # symbol to mark a line as a comment. The M4 processor ignores it and processes the line anyway. In my final file, I ended up removing the `LUSER_RELAY’ line. My `confDOMAIN_NAME’ had the value of `’. No SMART_HOST was necessary for me (thank you WideOpenWest). I added one other line before the mailer(SMTP) line. FEATURE(`authinfo’)dnl

With all of these changes made, I got sendmail working with but sadly PHP’s mail() function still didn’t work even after I create my /usr/local/lib/php.ini file as:
[mail function]
sendmail_path = /usr/sbin/sendmail
sendmail_from = <email>

PHP would always die with a gethostbyaddr( failed: 3 messge. I never did figure out what that really means or how to fix it. Once again, visit Visit for an alternative to PHP’s mail() function that actually works with Jaguar and

EdwardD20 at mac dot com