Re: cvs: php4 /ext/standard mail.c php_mail.h

From: Date: Tue, 06 Feb 2001 09:43:53 +0000
Subject: Re: cvs: php4 /ext/standard mail.c php_mail.h
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3927@lists.php.net to get a copy of this message
On Tue, 6 Feb 2001, sterling hughes wrote: > Derick Rethans wrote: > > > > I know this... it should probably be noted in the docs. > > > > > Are you sure we should be adding that option to the mail() command? If the > > > user really needs the advanced features provided by sendmail, they can > > > easily use popen() to achieve this... > > > > I think the -f option to sendmail is not advanced, and that because that > > without this -f option, all mail seems to come from nobody@localhost, this > > clutters up the logs, and no stats can be gegenerated about the usage of > > the scripts that send mail. > > > > Set the additional headers (FROM:), it seems to work for me. If you look clearly it sets the From: header correctly, but not the ReturnPath header, and in the logs there still will be nobody@localhost. > > In perl, most people will open up a pipe to sendmail and set the from > header, its been working there to... The learning curve for perl is much steeper than the one for PHP :) and I suppose it doesn't work from Perl either. (I'm not talking about the From: header, but about the ReturnPath and log messages. The reason why I made this patch is that when some user fills in a false e-mail adres into a form which then tries to mail something back to the e-mail adres entered, the maillog will become full of things and the sysadm gets shitloads of warnings :) > > If this doesn't work, its a bug and should be fixed. > > > The popen is possible too of course, but I think it's not that easy to do > > for almost not experienced users. To lower the bar for these users (and > > for making the transistion easier) I think this functionality is justified > > to be included in the CVS tree. > > > > If you know about the -f sendmail option, then you pretty much know how > to use sendmail. Opening a pipe to an external program is pretty basic. Therefore I would recommend the fifth parameter only to be used for the -f parameter only. > > > For security, I thought about makeing the fifth parameter only be > > used for the -f option only, but this would be troublesome for other > > mailers probably. However, I really think that restricting it to the -f > > option is better. > > Why have it then, just properly set the from: header and it *should* > work. I really don't like the current solution because its only > specific to one system, and can be done differently... You're right about the problem occurring with other mail servers. I think it's also possible to make an ini entry for the name of the parameter, as opposed to code it hard into the source. Derick

« previous php.cvs (#3927) next »