PHP 4.0 Bug #8301 Updated: Mail doesn't support -f

From: Date: Sun, 17 Dec 2000 15:32:36 +0000
Subject: PHP 4.0 Bug #8301 Updated: Mail doesn't support -f
Groups: php.dev 
Request: Send a blank email to php-dev+get-41649@lists.php.net to get a copy of this message
ID: 8301 Updated by: stas Reported By: dirk@rackspace.com Status: Open Old-Bug Type: Mail related Bug Type: Feature/Change Request Assigned To: Comments: You should use Errors-To and Return-Path headers, it'll help. Previous Comments: --------------------------------------------------------------------------- [2000-12-17 10:28:35] dirk@rackspace.com The current mail function /sendmail setting doesn't support the -f flag for sendmail. This means that when an email is sent out by a php script it doesn't bounce back to the from or reply-to address it bounces back to the web server. In a virtual hosting situation this is a nightmare. I wasn't sure how to handle all the regular expression stuff in c but I have a basic outline for the change needed in mail.c: if (strstr(senmail_path,"-f")!=NULL && (strstr(headers,"Reply-To:")!=NULL||strstr(headers,"From:")!=NULL)) { int failure=0; /* They want to override * They have a valid header * Need to build up sendmail_path * First copy out the Reply-To: or From: * / if (strstr(headers,"Reply-To:")!=NULL) { /* Reply-To takes precidence */ /* find out the reply-to address */ } else if (strstr(headers,"From:")!=NULL) { /* find the From address */ } if (no_match==1) { sendmail = popen(sendmail_path, "w"); } else { /*copy the modify the sendmail path so that -f is overriden by -f reply-to address or -f from_address */' sendmail = popen(new_sendmail_path, "w"); } } else { sendmail = popen(sendmail_path, "w"); } --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8301

« previous php.dev (#41649) next »