Track php mail function by vhost

Often client php unsecure web scripts get abused by spammers and tracking which vhost is responsible for spam from maillog is simply impossible if there is no identificator for each vhost php mail() function. Here is how to add it to iworx vhost skeleton (or to vhost conf file).


nano -w /chroot/home/interworx/etc/vhost-base.conf
--- ADD ---
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f<<DOMAIN>>" 
--- ADD ---

That’s pretty useful, thanks for sharing! :slight_smile:

This is very useful, one question:
What is the easiest and fastest way to apply this to all existing http confs?

I’m not sure if one can force iworx to update all vhost conf-s from templates - then probably you would have to write shell script that adds this line to every vhost file if not alreay there. Shouldn’t be too hard.