Thomas -Balu- Walter wrote:
Hello everyone,
I just subscribed today, and the only note regarding this issue I found so far was by David Fontaine on Fri Oct 21 2005.
RoundCube fails to send mail if the safe_mode is active and the PHP mail() is used, because the 5th parameter is disabled in that case.
I'd suggest to change the mail()-line in program/steps/mail/sendmail.inc to something like the following:
if ((bool)ini_get('safe_mode')) { $headers_php['Errors-To'] = $from; $header_str = $MAIL_MIME->txtHeaders($headers_php); $sent = mail($mailto, $msg_subject, $msg_body, $header_str); } else { $sent = mail($mailto, $msg_subject, $msg_body, $header_str, "-f$from"); }
Regarding to my sendmail man page -f is used to "Set the envelope sender address. This is the address where delivery problems are sent to, unless the message contains an Errors-To: message header."
Since the envelope sender can not be set because of the safe_mode restriction, my version adds the "Errors-To:" header as the man page suggests.
Please note the following from the Postfix Changelog.
Cleanup: support for the non-standard Errors-To: header is removed. File: cleanup/cleanup_message.c.
Also, RFC 822 doesn't mention Errors-To anywhere and it's discouraged in RFC 2076 (http://www.faqs.org/rfcs/rfc2076.html).
So please leave out the Errors-To header and there is no guarantee it is supported on other mailservers besides sendmail.
The Return-Path: in this case will usually be something like "www-data@www.example.com", but it shouldn't hurt that much anymore, since bounces should be returned to the Errors-To: address.
No, they should not according to the RFC.
Balu