go to bug id or search bugs for
I would like to put in a request for a configuration option that would prevent
PHP from using sendmail or other MTAs even if available.
Add a Patch
Add a Pull Request
What would be the use case for this that disable_functions=mail wouldn't solve?
The use case is purely aimed at dependency cleanup in Linux distributions. Currently, when installing PHP on virtually all distros a mail program must be installed with it to satisfy this dependency.
An example: A source distribution such as Gentoo, could implement a compile flag to state whether or not it will be compiled with mail support, passing this configuration option to PHP accordingly. This would then reduce the number of packages that are required in order to achieve a minimal PHP installation.
This is part of a larger personal effort. I've been filing bug reports and patches for a number of programs that depend on a mail package when email isn't relevant to their core function. My ultimate goal is to make it possible to have a Linux system without any mail program installed, seeing as the vast majority of desktops and servers don't send mail themselves (usually handing it through a dedicated mail server, or a 3rd party mail service).
I think sendmail check should be removed and always build mail().
Isn't it enough display warning while executing ./configure?
That is actually the exact opposite of what I'm proposing. I'm proposing for an additional way to *disable* the use of sendmail within PHP. The end goal, as stated already is to improve dependency management in various linux distributions that are trying to make MTA's optional.
So you would like to remove mail() completely from PHP even if 'configure' detected /usr/bin/sendmail? I thought you would like to build mail() regardless of sendmail binary existence.
It does not make sense to me.
I would like to remove mail() completely from PHP even if 'configure' detected /usr/bin/sendmail.