note 42533 added to function.mail
| From: | CameronJust at rn2 dot php dot net | Date: | Thu, 20 May 2004 12:03:58 +0000 |
| Subject: | note 42533 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69867@lists.php.net to get a copy of this message | ||
We have the problem of having multiple virtual hosts on the one system. If any of these virtual
hosts sends an email which bounces the bounces will go to whatever is set as the default return-path
header. We wanted all bounces to return to the virtual hosts mail account so they can deal with the
bounces instead of our sysadmin.
You cannot set this in the headers in the mail() function so this will not work.
$headers .= "Return-path: fred@mydomain.com.au\n";
You MUST set this when defining the virtual host with the following in the virtual host directive
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f
from@mydomain.com.au"
This can cause an extra header however to be added to messages stating that the return-path was
modified like below.
X-Authentication-Warning: mydomain.com.au: www set sender to postmaster@mydomain.com.au using -f
Some spam programs will block messages with this header in them. So the solution is to add the user
that your webserver runs as to the trusted users of sendmail.
http://www.netsys.com/fwtk/1998/07/msg00052.html
Now everything works as it should ;)
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42533
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42533&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42533&report=yes
Search -- http://master.php.net/manage/user-notes.php