Any way to count monthly sent mails via mailman?

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,257
60
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello people. I need to count how many mails have been sent by a given mailman list in one given month. Is there any script, console command or software to perform this?
I tried
Code:
exigrep '[email protected]' /var/log/exim_mainlog|grep "<="
and
Code:
zcat /var/log/exim_mainlog.*.gz | grep "<= [email protected]" |grep "2010-08"|awk '{print $4}' | uniq | wc -l
but they are inaccurate and very cpu expensive.
The watched mailing lists are not setup to archive sent mails, so I have to figure out how to count the total mail sent. Any clue?