Bug #53984 [Opn]: mail() regression with sendmail_path containing -f
| From: | danger at freebsd dot org | Date: | Sun, 13 Feb 2011 12:12:29 +0000 |
| Subject: | Bug #53984 [Opn]: mail() regression with sendmail_path containing -f | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158740@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
User updated by: danger at freebsd dot org
Reported by: danger at freebsd dot org
Summary: mail() regression with sendmail_path containing -f
Status: Open
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:
Did you test the provided code?
Previous Comments:
------------------------------------------------------------------------
[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