Re: postfix with PHP on Mac OS X

From: Date: Thu, 22 Jul 2004 19:19:45 +0000
Subject: Re: postfix with PHP on Mac OS X
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191558@lists.php.net to get a copy of this message
I'm betting that the problem is with security. By default, Apple ships the mail server configured to NOT be an open relay. Meaning, you need to provide a login name and password in order to send email. This is a very good thing, otherwise your machine would be used to send out spam. In order to send email from php, your mail server (postfix, sendmail, whatever) needs to be configured to allow relaying from the machine your php is running from, since php doesn't have an option to "login" to the mail server. In sendmail, this is controlled from the /etc/mail/access file. In postfix, I think the file is /etc/postfix/access. Read the file carefully. Then you can add the line "x.x.x.x RELAY". With x.x.x.x being the ip address of the machine that php is running on. You can also add lines like spamoffers.com REJECT, to block all email from that domain. To check if your mail server is actually running, type "telnet mailserver.com 25" in your terminal. If it is running, you should get a message like "220 mailserver.com ESMTP...". Then type "quit" to get out. On Jul 22, 2004, at 2:21 PM, PHP Junkie wrote:
Astrum Et Securis, I'm using a PowerMac G5 machine, which has the MacOS X Panther. It comes with the Postfix mail server, which I'm now trying to use with PHP. I was able to define the sendmail_path to the Postfix sendmail in the PHP.INI .. Now what happens is, on my localhost when I run the website, and I run a php page that sends form data to email using the mail() function, it doesn't give me any error, but the mail never arrives in the defined mailbox. Any help appreciated. RSJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#191558) next »