Configuring sendmail on Jaguar with mac.com (smtp.mac.com)
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 firstname.lastname@example.org> <to email email@example.com> < ~<homedir>/message
This sent a message from <from email firstname.lastname@example.org> to <to email email@example.com>.
In my /etc/mail/authinfo file:
authinfo:smtp.mac.com “U:<userid>” “P=<password>” “R:smtp.mac.com” “M:PLAIN LOGIN”
In my /etc/mail/access file:
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/config.mc 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 config.mc file, I ended up removing the `LUSER_RELAY’ line. My `confDOMAIN_NAME’ had the value of `smtp.mac.com’. 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 smtp.mac.com but sadly PHP’s mail() function still didn’t work even after I create my /usr/local/lib/php.ini file as:
sendmail_path = /usr/sbin/sendmail
sendmail_from = <email firstname.lastname@example.org>
SMTP = smtp.mac.com
PHP would always die with a gethostbyaddr(192.168.0.2) failed: 3 messge. I never did figure out what that really means or how to fix it. Once again, visit Visit http://www.phpguru.org/smtp.html for an alternative to PHP’s mail() function that actually works with Jaguar and smtp.mac.com.
EdwardD20 at mac dot com