There is a little patch at http://www.lancs.ac.uk/~steveb/patches/php-mail-header-patch/ . It could be added safely to PHP patchset. Purpose of this patch is to add simple header to every mail sent using mail() function. It looks like: X-PHP-Script: <servername><php-self> for <remote-addr> X-PHP-Script: www.example.com/~user/testapp/send-mail.php for 10.0.0.1 It can help A LOT when somebody is spamming using your server or using scripts of some unsuspecting Individuhals. It applies properly against 5.12.11 and works just fine on x86 platform. Thanks! Reproducible: Always Steps to Reproduce:
Thanks for your interest in gentoos php! I've considered the positive impact of your idea against our ground rule of staying as close to upstream as possible and decided not to include the patch. We're actively aiming to REDUCE the size of our patchset, not increase it. So maybe you can open a feature request at bugs.php.net and see if upstream is willing to include it.
*** Bug 406093 has been marked as a duplicate of this bug. ***