#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2005-01-02 Thread alexhuang at anet dot net dot tw
 ID:   28976
 Comment by:   alexhuang at anet dot net dot tw
 Reported By:  kdaniel at aosepc dot com
 Status:   Open
 Bug Type: Mail related
 Operating System: Windows\Apache
 PHP Version:  4.3.6
 New Comment:

Please try to make a copy of c:\winnt\php.ini to c:\php.

After I copied the file, no more error messages.


Previous Comments:


[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-devm=109286883222906w=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



[2004-08-23 19:02:33] joe at inexo dot com

It's not coming from php.ini.



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=28976edit=1


#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-11-25 Thread datarecovery at 163 dot com
 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-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)) {
  

#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-11-25 Thread datarecovery at 163 dot com
 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   

#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-11-10 Thread jpablo at dld dot net
 ID:   28976
 Comment by:   jpablo at dld dot net
 Reported By:  kdaniel at aosepc dot com
 Status:   Open
 Bug Type: Mail related
 Operating System: Windows\Apache
 PHP Version:  4.3.6
 New Comment:

The same happens with 4.3.7


Previous Comments:


[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-devm=109286883222906w=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



[2004-08-23 19:02:33] joe at inexo dot com

It's not coming from php.ini.



[2004-08-18 23:07:34] dv at josheli dot com

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
From: header does not seem to work.

test.php:
?php
mail('[EMAIL PROTECTED]','subject','body',From: [EMAIL PROTECTED]);
?

Warning: mail(): sendmail_from not set in php.ini or custom From:
header missing in C:\dev\quiktests\test.php on line 3



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=28976edit=1


#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-11-04 Thread Charlesk at netgaintechnology dot com
 ID:   28976
 Comment by:   Charlesk at netgaintechnology 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:

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


Previous Comments:


[2004-08-24 19:53:10] dv at josheli dot com

http://marc.theaimsgroup.com/?l=php-devm=109286883222906w=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



[2004-08-23 19:02:33] joe at inexo dot com

It's not coming from php.ini.



[2004-08-18 23:07:34] dv at josheli dot com

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
From: header does not seem to work.

test.php:
?php
mail('[EMAIL PROTECTED]','subject','body',From: [EMAIL PROTECTED]);
?

Warning: mail(): sendmail_from not set in php.ini or custom From:
header missing in C:\dev\quiktests\test.php on line 3



[2004-08-06 21:39:27] kdaniel at aosepc dot com

I don't see how that is possible because there is no way for the mail
server to pick up the sendmail_from ini setting.  PHP has to be using
it somewhere.  There needs to be a way to disable its use.



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=28976edit=1


#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-08-24 Thread dv at josheli dot com
 ID:   28976
 Comment by:   dv at josheli 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:

http://marc.theaimsgroup.com/?l=php-devm=109286883222906w=2


Previous Comments:


[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



[2004-08-23 19:02:33] joe at inexo dot com

It's not coming from php.ini.



[2004-08-18 23:07:34] dv at josheli dot com

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
From: header does not seem to work.

test.php:
?php
mail('[EMAIL PROTECTED]','subject','body',From: [EMAIL PROTECTED]);
?

Warning: mail(): sendmail_from not set in php.ini or custom From:
header missing in C:\dev\quiktests\test.php on line 3



[2004-08-06 21:39:27] kdaniel at aosepc dot com

I don't see how that is possible because there is no way for the mail
server to pick up the sendmail_from ini setting.  PHP has to be using
it somewhere.  There needs to be a way to disable its use.



[2004-08-06 19:27:15] [EMAIL PROTECTED]

I'm pretty sure that this header is added by the SMTP mail server and
not by PHP itself. PHP first writes the generated headers to
the SMTP stream, followed by any additional_headers you passed to
mail(). Any headers following those you passed as additional_headers
have been added by the transporting mail server (s). Looks like it is
adding the SMPT MAIL FROM into Return_Path:



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=28976edit=1


#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-08-23 Thread joe at inexo dot com
 ID:   28976
 Comment by:   joe at inexo 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:

It's not coming from php.ini.


Previous Comments:


[2004-08-18 23:07:34] dv at josheli dot com

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
From: header does not seem to work.

test.php:
?php
mail('[EMAIL PROTECTED]','subject','body',From: [EMAIL PROTECTED]);
?

Warning: mail(): sendmail_from not set in php.ini or custom From:
header missing in C:\dev\quiktests\test.php on line 3



[2004-08-06 21:39:27] kdaniel at aosepc dot com

I don't see how that is possible because there is no way for the mail
server to pick up the sendmail_from ini setting.  PHP has to be using
it somewhere.  There needs to be a way to disable its use.



[2004-08-06 19:27:15] [EMAIL PROTECTED]

I'm pretty sure that this header is added by the SMTP mail server and
not by PHP itself. PHP first writes the generated headers to
the SMTP stream, followed by any additional_headers you passed to
mail(). Any headers following those you passed as additional_headers
have been added by the transporting mail server (s). Looks like it is
adding the SMPT MAIL FROM into Return_Path:



[2004-07-21 04:04:12] kdaniel at aosepc dot com

Yes, PHP is picking up the sendmail_from ini setting and sticking it
into the mime headers as Return-Path.



[2004-07-21 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



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=28976edit=1


#28976 [Com]: Ability to disable Return-Path header or use From header instead of php.ini

2004-08-18 Thread dv at josheli dot com
 ID:   28976
 Comment by:   dv at josheli 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:

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
From: header does not seem to work.

test.php:
?php
mail('[EMAIL PROTECTED]','subject','body',From: [EMAIL PROTECTED]);
?

Warning: mail(): sendmail_from not set in php.ini or custom From:
header missing in C:\dev\quiktests\test.php on line 3


Previous Comments:


[2004-08-06 21:39:27] kdaniel at aosepc dot com

I don't see how that is possible because there is no way for the mail
server to pick up the sendmail_from ini setting.  PHP has to be using
it somewhere.  There needs to be a way to disable its use.



[2004-08-06 19:27:15] [EMAIL PROTECTED]

I'm pretty sure that this header is added by the SMTP mail server and
not by PHP itself. PHP first writes the generated headers to
the SMTP stream, followed by any additional_headers you passed to
mail(). Any headers following those you passed as additional_headers
have been added by the transporting mail server (s). Looks like it is
adding the SMPT MAIL FROM into Return_Path:



[2004-07-21 04:04:12] kdaniel at aosepc dot com

Yes, PHP is picking up the sendmail_from ini setting and sticking it
into the mime headers as Return-Path.



[2004-07-21 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-07-06 15:32:27] [EMAIL PROTECTED]

You mean it uses the sendmail_from ini setting?




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=28976edit=1