Simple PHP SPAM tracking and logging tip

This one’s easy. Place this in your php.ini (don’t forget to restart, if needed).

mail.add_x_header = On
mail.log = /var/log/phpmail.log

You can change the log file location, of course.

Note that mail.add_x_header  will add the script file to the email header allowing someone to see which file generated the email. This may be a security issue for your site, so be careful.

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.