Tuesday, October 8, 2013

How to log Script Filename of Emails Sent by PHP Mail() Function to Detect Spam


Today I faced a server that seemed to was abused by some spammers.
I spent 6 hours to find a solution about how to Log mails and mail sender scripts in php...
Finally found that the PHP > 5.3 has the feature itself!!

Just enable "mail.log" in your php configuration and It will log each mail and the script which sends it...

It's also recommended to enable "mail.add_x_header", It'll make it easier to address spam complaints sent  from your servers...

No comments:

Post a Comment