I was wondering if it's possible to somehow add custom headers to all outgoing mail...
Specifically for tracking spam. In my own php scripts, I use following to identify where the mail was sent from:
$headers .= "X-AnitAbuse: Server : ".$_SERVER['SERVER_NAME'].". Location : ".$_SERVER['PHP_SELF'].".\r\n";
But I need something in case other users on the system might develop or use an insecure php mail form on their site.
Even something like this would be very helpful:
Or anything at all to identify the real hostname (not postfix host) or real userid (not www-data or server's username).
1. Is it possible in general?
2. Is it possible to make the php mail() function use these headers without needing to specify them in the script?
Many thanks in advance!