#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini
| From: | datarecovery at 163 dot com | Date: | Fri, 26 Nov 2004 07:52:17 +0000 |
| Subject: | #28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69461@lists.php.net to get a copy of this message | ||
ID: 28976
Comment by: datarecovery at 163 dot com
Reported By: kdaniel at aosepc dot com
Status: Open
Bug Type: Mail related
Operating System: Windows\Apache
PHP Version: 4.3.6
New Comment:
<A href="http://user1.7host.com/ycxxw">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´ÖÐÐÄ</A>
<A href="http://pafu.51.net/index.htm ">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.51.net">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/case.htm
"> ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/support.htm ">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/case.htm
"> ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://www.aimite.com/index.htm
"> Êý¾Ý»Ö¸´Ñо¿</A>
<A href="http://www.aimite.com/link.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/index.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-2.htm
"> ÉϺ£Ó²ÅÌÊý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-3.htm
"> ÉϺ£Êý¾Ý¿â»Ö¸´</A>
<A href="http://www.belinking.com/n1-4.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/index1.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/luich.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/price.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts1.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts2.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://www.belinking.com/n1-5.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-6.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n2.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n3.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n4.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n5.htm
"> ÉϺ£Êý¾Ý»Ö¸´ÁªÏµ</A>
<A href="http://www.belinking.com ">
ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc.htm ">
Êý¾Ý»Ö¸´¼¼ÊõÎĵµ</A>
<A href="http://hebu.51.net/case.htm ">
Êý¾Ý»Ö¸´³É¹¦°¸Àý</A>
<A href="http://hebu.51.net/price.htm ">
Êý¾Ý»Ö¸´±¨¼Û</A>
<A href="http://hebu.51.net/doc0.htm ">
Ó²ÅÌÄÚ²¿½á¹¹Í¼Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc1.htm ">
Ó²Å̹ÊÕÏÕï¶ÏÓëÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc2.htm ">
Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc3.htm ">
Êý¾Ý»Ö¸´Ó²Å̳£¼ûµÄһЩ¹ÊÕÏ´¦Àí</A>
<A href="http://hebu.51.net/doc4.htm ">
Î÷²¿Êý¾ÝµÄ¹¤³§£¨ÉÏ£©</A>
<A href="http://hebu.51.net/lianxi.htm
"> Êý¾Ý»Ö¸´ÁªÏµ</A>
<A href="http://pafu.w4.dns2008.cn/intro.htm
">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/contact.htm
">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc5.htm
">Î÷²¿Êý¾ÝµÄ¹¤³§£¨Ï£©</A>
<A href="http://hebu.51.net/doc6.htm
">Ó²ÅÌÂí´ï¼¼ÊõÆÊÎö</A>
<A href="http://hebu.51.net/raid.htm
">´ÅÅÌÕóÁÐÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc7.htm
">Ó²ÅÌÊý¾Ý±£»¤¼¼Êõ</A>
<A href="http://hebu.51.net/hdd.htm
">Ó²ÅÌÊý¾Ý»Ö¸´</A>
<A href="http://www.aimite.com/case.htm
">Êý¾Ý»Ö¸´³É¹¦°¸Àý</A>
<A href="http://www.aimite.com/contact.htm
">Êý¾Ý»Ö¸´ÁªÏµÎÒÃÇ</A>
<A href="http://www.aimite.com/map.htm
">Êý¾Ý»Ö¸´µØÍ¼</A>
<A href="http://hebu.51.net/doc8.htm
">Ó²ÅÌÊý¾Ý´æ´¢¼°ÆäÏà¹ØÏµÍ³µÄÔÀí</A>
<A href="http://hebu.51.net/doc9.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc10.htm
">×ß½øÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc11.htm
">һЩÅÌ·ò¿ªÅָ̻´Êý¾ÝµÄʵ¼ùͼƬ</A>
<A href="http://hebu.51.net/index.htm">ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/case.htm
">Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/contact.htm
">Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/eqe.htm">Êý¾Ý»Ö¸´
</A>
<A href="http://hebu.myrice.com/index.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/ts3.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/ts4.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/tse.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://recycle.myrice.com ">
Êý¾Ý»Ö¸´ </A>
Previous Comments:
------------------------------------------------------------------------
[2004-11-26 08:48:28] datarecovery at 163 dot com
<A href="http://user1.7host.com/ycxxw">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´ÖÐÐÄ</A>
<A href="http://pafu.51.net/index.htm ">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.51.net">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/case.htm
"> ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/support.htm ">
ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/case.htm
"> ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://www.aimite.com/index.htm
"> Êý¾Ý»Ö¸´Ñо¿</A>
<A href="http://www.aimite.com/link.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/index.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-2.htm
"> ÉϺ£Ó²ÅÌÊý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-3.htm
"> ÉϺ£Êý¾Ý¿â»Ö¸´</A>
<A href="http://www.belinking.com/n1-4.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/index1.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/luich.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/price.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts1.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/ts2.htm
"> Êý¾Ý»Ö¸´ </A>
<A href="http://www.belinking.com/n1-5.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n1-6.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n2.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n3.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n4.htm
"> ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://www.belinking.com/n5.htm
"> ÉϺ£Êý¾Ý»Ö¸´ÁªÏµ</A>
<A href="http://www.belinking.com ">
ÉϺ£Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc.htm ">
Êý¾Ý»Ö¸´¼¼ÊõÎĵµ</A>
<A href="http://hebu.51.net/case.htm ">
Êý¾Ý»Ö¸´³É¹¦°¸Àý</A>
<A href="http://hebu.51.net/price.htm ">
Êý¾Ý»Ö¸´±¨¼Û</A>
<A href="http://hebu.51.net/doc0.htm ">
Ó²ÅÌÄÚ²¿½á¹¹Í¼Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc1.htm ">
Ó²Å̹ÊÕÏÕï¶ÏÓëÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc2.htm ">
Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc3.htm ">
Êý¾Ý»Ö¸´Ó²Å̳£¼ûµÄһЩ¹ÊÕÏ´¦Àí</A>
<A href="http://hebu.51.net/doc4.htm ">
Î÷²¿Êý¾ÝµÄ¹¤³§£¨ÉÏ£©</A>
<A href="http://hebu.51.net/lianxi.htm
"> Êý¾Ý»Ö¸´ÁªÏµ</A>
<A href="http://pafu.w4.dns2008.cn/intro.htm
">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://pafu.w4.dns2008.cn/contact.htm
">ÉϺ£ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc5.htm
">Î÷²¿Êý¾ÝµÄ¹¤³§£¨Ï£©</A>
<A href="http://hebu.51.net/doc6.htm
">Ó²ÅÌÂí´ï¼¼ÊõÆÊÎö</A>
<A href="http://hebu.51.net/raid.htm
">´ÅÅÌÕóÁÐÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc7.htm
">Ó²ÅÌÊý¾Ý±£»¤¼¼Êõ</A>
<A href="http://hebu.51.net/hdd.htm
">Ó²ÅÌÊý¾Ý»Ö¸´</A>
<A href="http://www.aimite.com/case.htm
">Êý¾Ý»Ö¸´³É¹¦°¸Àý</A>
<A href="http://www.aimite.com/contact.htm
">Êý¾Ý»Ö¸´ÁªÏµÎÒÃÇ</A>
<A href="http://www.aimite.com/map.htm
">Êý¾Ý»Ö¸´µØÍ¼</A>
<A href="http://hebu.51.net/doc8.htm
">Ó²ÅÌÊý¾Ý´æ´¢¼°ÆäÏà¹ØÏµÍ³µÄÔÀí</A>
<A href="http://hebu.51.net/doc9.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc10.htm
">×ß½øÊý¾Ý»Ö¸´</A>
<A href="http://hebu.51.net/doc11.htm
">һЩÅÌ·ò¿ªÅָ̻´Êý¾ÝµÄʵ¼ùͼƬ</A>
<A href="http://hebu.51.net/index.htm">ÅÌ·òÊý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/case.htm
">Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/contact.htm
">Êý¾Ý»Ö¸´ </A>
<A href="http://hebu.myrice.com/eqe.htm">Êý¾Ý»Ö¸´
</A>
<A href="http://hebu.myrice.com/index.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/ts3.htm
">Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/ts4.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://hebu.myrice.com/tse.htm
"> Êý¾Ý»Ö¸´</A>
<A href="http://recycle.myrice.com ">
Êý¾Ý»Ö¸´ </A>
------------------------------------------------------------------------
[2004-11-11 04:38:29] jpablo at dld dot net
The same happens with 4.3.7
------------------------------------------------------------------------
[2004-11-04 16:53:59] Charlesk at netgaintechnology dot com
It seems to me that this was thought of but never implemented. In
sendmail.c:
if (headers) {
char *pos = NULL;
size_t i;
/* Use PCRE to trim the header into the right format */
if (NULL == (headers = php_win32_mail_trim_header(headers
TSRMLS_CC))) {
*error = W32_SM_PCRE_ERROR;
return FAILURE;
}
/* Create a lowercased header for all the searches so we're finally
case
* insensitive when searching for a pattern. */
if (NULL == (headers_lc = estrdup(headers))) {
efree(headers);
*error = OUT_OF_MEMORY;
return FAILURE;
}
for (i = 0; i < strlen(headers_lc); i++) {
headers_lc[i] = tolower(headers_lc[i]);
}
}
/* Fall back to sendmail_from php.ini setting */
if (mailRPath && *mailRPath) {
RPath = estrdup(mailRPath);
}
else if (INI_STR("sendmail_from")) {
RPath = estrdup(INI_STR("sendmail_from"));
} else {
if (headers) {
efree(headers);
efree(headers_lc);
}
*error = W32_SM_SENDMAIL_FROM_NOT_SET;
return FAILURE;
}
I would think that in the if (headers) section there should be some
code to set the mailRPath if the From header is found in headers. That
way when it falls into the if (mailRPath && *mailRPath) section it will
appropriately assign the from to the return path.
Can this be fixed soon?
Thanks
Charles
------------------------------------------------------------------------
[2004-08-24 19:53:10] dv at josheli dot com
http://marc.theaimsgroup.com/?l=php-dev&m=109286883222906&w=2
------------------------------------------------------------------------
[2004-08-23 19:19:30] kdaniel at aosepc dot com
Yes it is. The problem exists in sendmail.c
The code as follows:
/* Fall back to sendmail_from php.ini setting */
if (mailRPath && *mailRPath) {
RPath = estrdup(mailRPath);
}
else if (INI_STR("sendmail_from")) {
RPath = estrdup(INI_STR("sendmail_from"));
} else {
if (headers) {
efree(headers);
efree(headers_lc);
}
*error = W32_SM_SENDMAIL_FROM_NOT_SET;
return FAILURE;
}
Should be changed to:
/* Fall back to sendmail_from php.ini setting */
if (mailRPath && *mailRPath) {
RPath = estrdup(mailRPath);
}
else if (INI_STR("sendmail_from")) {
RPath = estrdup(INI_STR("sendmail_from"));
} else {
if (headers) {
efree(headers);
efree(headers_lc);
} else {
*error = W32_SM_SENDMAIL_FROM_NOT_SET;
return FAILURE;
}
}
I have not tested this, it is just a guess.
Kevin
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28976
--
Edit this bug report at http://bugs.php.net/?id=28976&edit=1