Some hosting providers (e.g. Host Europe) require the sendmail "From" option -f with a valid email address in order to send out email via PHP's send() function. This is due to their spam prevention precautions.
DokuWiki already provides an option to customize the "From" field of the header. Additionally it should automatically set the above mentioned sendmail option if a custom "From" address is provided.
My proposal looks like this:
file: inc/mail.php
function: mail_send()
code:
if ('' != $from) {
if (null == $params) {
$params = "-f $from";
} else {
$params .= " -f $from";
}
}
I also attached a patchfile.
The patchfile also contains an addition to the regex pattern used for mail_isvalid(). It includes the domainname "localdomain" as per RFC-something.