php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32600 PHP sets return-path incorrectly
Submitted: 2005-04-06 01:03 UTC Modified: 2005-08-08 00:14 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: freddie at vbulletin dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.0.4 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 19 = ?
Subscribe to this entry?

 
 [2005-04-06 01:03 UTC] freddie at vbulletin dot com
Description:
------------
A new bug has been introduced with the bug fix listed at http://bugs.php.net/bug.php?id=28976

The above fix attempts to set a reverse-path based on the From: header if sendmail_from is undefined.

The problem with this is that the From: header is taken verbatim and not formatted to the RFC 2822 specification.

This results in the email being rejected by the server.

Reproduce code:
---------------
Example:

$headers .= "From: \"Example User\" <email@example.com>";

PHP will then set  the RPath to "\"Example User\" <email@example.com>" when it should be "<email@example.com>"

Expected result:
----------------
Line 440 win32/sendmail.c:

snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<email@example.com>\r\n", RPath);

Actual result:
--------------
Line 440 win32/sendmail.c:


snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<Example User <email@example.com>>\r\n", RPath);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-06 01:07 UTC] freddie at vbulletin dot com
Correction:

RPath should be set to "email@example.com", not "<email@example.com>"
 [2005-08-08 00:14 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Same as bug #28038 (It's a general problem with address formatting)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC