A php script is sending tons of emails. I want to detect what is the source. All emails are sent by the use www-data which the user used by apache. When I check process, I have this result :
www-data 16220 0.7 4.7 402508 95924 ? S 09:37 0:06 /usr/sbin/apache2 -k start
www-data 16352 0.4 3.8 402132 78064 ? S 09:39 0:03 /usr/sbin/apache2 -k start
www-data 16725 0.6 3.8 402472 78624 ? S 09:46 0:02 /usr/sbin/apache2 -k start
www-data 16840 0.8 4.2 410744 87204 ? S 09:48 0:01 /usr/sbin/apache2 -k start
www-data 16949 1.0 4.5 417560 93436 ? S 09:49 0:01 /usr/sbin/apache2 -k start
www-data 16958 1.0 3.5 402120 72748 ? S 09:50 0:01 /usr/sbin/apache2 -k start
www-data 16978 1.2 4.6 425160 94864 ? S 09:51 0:00 /usr/sbin/apache2 -k start
www-data 16980 0.8 3.5 402140 72208 ? S 09:51 0:00 /usr/sbin/apache2 -k start
www-data 16983 0.4 2.6 402160 54400 ? S 09:51 0:00 /usr/sbin/apache2 -k start
Apache is using many processes and I don't know what is the script that send mail.
Is there a way to do that?