rainloop-webmail icon indicating copy to clipboard operation
rainloop-webmail copied to clipboard

php mail() Return-Path

Open singpolyma opened this issue 7 years ago • 3 comments

When using php mail() function to send mail from RainLoop, every message from every user gets Return-Path: [email protected] header. This causes bounced messages to go to the server admin (me) instead of to the individual users.

https://stackoverflow.com/a/12446081/8611 indicates that the -f flag to sendmail can be added to the mail() invocation to fix this.

singpolyma avatar Nov 22 '18 01:11 singpolyma

Thank you. Goot call! I have adjusted (locally) \rainloop\rainloop\v\1.12.1\app\libraries\RainLoop\Actions.php accordinly. It is around line 6268. Original:

$bR = $this->Config()->Get('labs', 'mail_func_additional_parameters', false) ?
	\mail($sMailTo, $sMailSubject, $sMailBody, $sMailHeaders, '-f'.$oFrom->GetEmail()) ?
	\mail($sMailTo, $sMailSubject, $sMailBody, $sMailHeaders);

webjoko avatar Dec 11 '18 01:12 webjoko

From that, it looks likely that just setting mail_func_additional_parameters to On in the ini file will fix it

singpolyma avatar Dec 12 '18 01:12 singpolyma

When using php mail() function to send mail from RainLoop, every message from every user gets Return-Path: [email protected] header. This causes bounced messages to go to the server admin (me) instead of to the individual users.

https://stackoverflow.com/a/12446081/8611 indicates that the -f flag to sendmail can be added to the mail() invocation to fix this.

hey can you send the php ini config code for php mail function

Hvckerman avatar Mar 13 '24 11:03 Hvckerman