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] cataphr...@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] cataphr...@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 f...@bar.tld

--FILE--

<?php

var_dump(mail('b...@foo.tld', 'subject', 'message', 'From: f...@bar.tld',
'-f...@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

Reply via email to