Hacks:Engine:Email sending from PHP
From VHCP Support
By default in your system all emails, send from PHP by mail() function, are returning back to www-data as user account in your system (it's for Debian, on others apache could be owned by different user). To let people receive errors back and more easily catching source of PHP email SPAM it's good idea little to change PHP sendmail settings.
Add to the end of next files:
/etc/vhcp/apache/parts/als_php2_entry.tpl /etc/vhcp/apache/parts/dmn_php2_entry.tpl /etc/vhcp/apache/parts/sub_php2_entry.tpl
this line, which changes sendmail options for each domain:
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@{DMN_NAME}"
and then regenerate your configs. After this all PHP-mails from domain would be originally send as from info@some.domain and all errors would return back on that address.
I suppose, it's commonly good idea to avoid trusting PHP, it's big hole for crackers. If hosting users would need to change email sending behaviour, they could use SMTP direct.
