PHP Server – Track down spammer script
Sometimes you need track down spam from your server. It is not a easy task, there is so many script in any web app so it almost impossible to manual search for mail function. But PHP from version 5.3 offer elegant solution.
How to log all script what call mail function ?
- Open your php.ini file (location depends on your installation and server)
- /etc/php.ini (RedHat based distro (Centos, Fedora, etc)
- /etc/php5/apache/php.ini Debian derivative (Ubuntu, etc)
- at windows it depends on your installation
- Insert this lines to php.ini
- The first one add header to outgoing email what will include UID and other script info
- The second one specify location where log will be saved