Postfix and PHP
Posted March 17th, 2004 @ 01:46pm by Erik J. Barzeski
I'm attempting to send email via PHP using Mac OS X 10.3's built in mailserver (postfix). I've followed the directions here and received no errors in setting up postfix.
PHP generates no errors in sending the email. However, the email is never received. Does anyone have any ideas what steps I might take next? Most people having trouble sending email from PHP seem to be on Windows (i.e. very little help to me) according to Google's results…
Posted 17 Mar 2004 at 2:53pm #
Do you have a proper DNS entry & MX record for your host? I find that I can't send or receive email at blueg3.homeip.net (using OSX Server's AppleMail rather than postfix) since the reverse DNS doesn't match causing most hosts to reject the connection.
Check /var/log/mail.log for any error messages.
Posted 17 Mar 2004 at 3:22pm #
I did
sudo postfix stop
andsudo postfix start
and got this:Mar 17 15:21:40 localhost postfix/postfix-script: stopping the Postfix mail system
Mar 17 15:21:40 localhost postfix/master[650]: terminating on signal 15
Mar 17 15:21:44 localhost postfix/postfix-script: starting the Postfix mail system
Mar 17 15:21:44 localhost postfix/master[811]: daemon started -- version 2.0.10
Posted 17 Mar 2004 at 3:24pm #
I also fired up the mail() command in a PHP script after starting the daemon above. No other messages were logged.
Posted 17 Mar 2004 at 4:00pm #
I've got it going now. I changed /private/etc/postfix/main.cf with this line:
myorigin = domain.com
All seems to be well now.
Posted 06 Dec 2004 at 10:42pm #
PHP email on Mac OS X
This might be easy for most folk, but I found it surprisingly difficult to get PHP to send email on my Mac OS X box (running 10.3 - it is a different process for previous versions of OS X). A...