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.
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.
Balu