Bug #53984 [Com]: mail() regression with sendmail_path containing -f
| From: | danger at FreeBSD dot org | Date: | Mon, 14 Feb 2011 14:32:30 +0000 |
| Subject: | Bug #53984 [Com]: mail() regression with sendmail_path containing -f | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158765@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53984&edit=1
ID: 53984
Comment by: danger at FreeBSD dot org
Reported by: danger at freebsd dot org
Summary: mail() regression with sendmail_path containing -f
Status: Feedback
Type: Bug
Package: Mail related
Operating System: FreeBSD, should not depend on OS
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Hello,
the MTA has not been changed during the upgrade, as I am using Sendmail
8.14.4 which comes with the FreeBSD base system.
Previous Comments:
------------------------------------------------------------------------
[2011-02-13 16:35:18] cataphract@php.net
Well, the test is meaningless without you telling which MTA you're
using. "sendmail" is provided by several programs.
Can you actually confirm that between the two versions PHP called
sendmail in a different fashion (perhaps by making sendmail_path, point
to wrapper program that logs the command line and possibly the data
passed?). I'm guessing you also changed your MTA when you upgraded PHP.
------------------------------------------------------------------------
[2011-02-13 13:12:29] danger at freebsd dot org
Did you test the provided code?
------------------------------------------------------------------------
[2011-02-13 04:32:51] cataphract@php.net
I find this a little hard to believe. Nothing has changed in
ext/standard/mail.c between these two versions.
------------------------------------------------------------------------
[2011-02-10 16:06:07] danger at freebsd dot org
Run the script with:
hosting# pear run-tests mail-test.phpt
Running 1 tests
FAIL mail(): returns false when sendmail_path contains a -f flag and we
use additional_params with one[mail-test.phpt]
wrote log to "/root/run-tests.log"
TOTAL TIME: 00:00
0 PASSED TESTS
0 SKIPPED TESTS
1 FAILED TESTS:
mail-test.phpt
------------------------------------------------------------------------
[2011-02-10 16:04:21] danger at freebsd dot org
Description:
------------
mail() returns false when sendmail_path contains a -f flag and we use
additional_params with -f specified again.
This is a regression from 5.3.3 (which I have updated from and
discovered the Roundcube stopped being able to send emails).
Additional information:
hosting# php -v
PHP 5.3.5 with Suhosin-Patch (cli) (built: Feb 8 2011 16:36:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
Test script:
---------------
--TEST--
mail(): returns false when sendmail_path contains a -f flag and we use
additional_params with one
--INI--
sendmail_path=/usr/sbin/sendmail -t -i -f foo@bar.tld
--FILE--
<?php
var_dump(mail('bar@foo.tld', 'subject', 'message', 'From:
foo@bar.tld',
'-ffoo@baz.tld'));
?>
--EXPECT--
bool(true)
Expected result:
----------------
bool(true)
Actual result:
--------------
hosting# cat mail-test.out
More than one "from" person
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53984&edit=1