note 18637 added to function.mail
| From: | Louis at ewens dot com | Date: | Wed, 30 Jan 2002 06:25:20 +0000 |
| Subject: | note 18637 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26018@lists.php.net to get a copy of this message | ||
On a Solaris OS host, Sendmail would always set a return-path header of the host name rather than
the To: address. Putting in an optional 5th parameter of "-fuser@returnpath.com" had no
apparent effect.
Rather than going the tedious genericstable alteration to Sendmail, Sendmail will allow the -f
option to take effect if certain security parameters are set in key files:
1. Add the account your web server runs as to the /etc/mail/trusted-users (Solaris 8) or
/etc/mail/sendmail.ct (Solaris 7) file, one account per line. If it doesn't exist, create it.
You should have a dedicated account for your web server.
2. Add to or create the file /etc/mail/relay-domains and add all the domains you want to send from,
one per line.
After making these changes Sendmail should allow PHP to set the -f option as long as the domain name
in the email address was listed in the relay-domains file and PHP/Apache is running as a trusted
user.
--
http://www.php.net/manual/en/function.mail.php
http://master.php.net/manage/user-notes.php?action=edit+18637
http://master.php.net/manage/user-notes.php?action=delete+18637
http://master.php.net/manage/user-notes.php?action=reject+18637