I would like to do some statistics on the e-mails sent through my postfix server.
Mostly I will need to create a report counting then number of messages that were sent through this machine.
I am running postfix on ubuntu 9.10, but have very limited experience managing it, so if someone could outline how to conceptually do the above I would be grateful.
Bonus points are if I will be able to filtering/groping on
- subject of the message (will mostly be simple RE)
- eventually I'd like to include spam score from Spamassasin or dspam (when I configure/install them)
Have no problem with SQL so if I could get csv of timestamp, subject, messageid, subject, spam-score I'd know how to proceed; just need to conceptually organize where to get this from (which options to set and/or which logs to extract from).
EDIT: I also have a requirement for the procedure to be as reliable as possible - I'd like to filter out any bounces and other errors if possible.