如何在centos服务器上找到发送邮件的php脚本

Our server has hosted more than 5 websites.

We have checked that you've reached your daily relay quota and mail added in the queue. We have checked that using mailq | tail -n 1 and get the counts 39342.

How to know which php script is sent the mail?

Your mailq|tail -n 1 just lists the number of mails in your outgoing queue. If you look at the complete output of mailq you should see the sender and recipient adresses. These adresses should help identify your php script.