Yes, the easiest way to do this is look at the exim logs. Mail sent via a script is represented by cwd (current working directory) in the exim logs.
You can very simply do the following:
Code:
grep cwd /var/log/exim_mainlog
You could also do something more detailed such as the following:
Code:
[[email protected] ~]# grep cwd /var/log/exim_mainlog |grep -v /var/spool/ |awk -F "cwd=" '{print $2}' |awk '{print $1}' |sort |uniq -c |sort -n
This will output the path and number of emails sent from that path