Email statistics are gone
#158 Henry, Thursday, 28 June 2012 10:54 PM (Category: Email)
(Tags: email statistics)

I just realised that I am missing my email statistics. Every night, a cron job would read through /var/log/maillog and analyse the previous day's email stats and then mail them to me. And a second cron job would use SpamAssassin's program and produce even more stats for me.

Alas, no more. They were in my /root/bin directory, and it hadn't been backed up and didn't get copied. So when the hard disk died, I lost my work.

I have copies of the emails, so I can reconstruct my own email stats program fairly easily. However, I went to see where was, and it looks like it no longer exists. Using Google, I found a 2004 version of it, and then a 2006 version of it. I'll work with these and get something useful out of them.

I found it interesting to watch spam counts. I remember a few years ago watching my spam count rise to about 1,300 per day, and then magically overnight it dropped to about 80 per day. I found out later that a big botnet was taken down about that time. It was interesting to see spam rise and fall. But I can't see that without my stats.

I can reconstruct my stats programs, but where do I store them so they get backed up? They run as root to get access to /var/logs. Should I be using some sudo jiggery? I'll do some reading and come up with something useful.

What would be better would be if the cron job would update a database, and create stats and graphs that I can view over time. That would be much better. And it's a more interesting project. I'll get right on it.