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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]