3

In Postfix, how do I measure how much traffic is used by each user or domain?

I can see no "out of the box" means of doing this with vanilla postfix, however, I am sure this is a pretty common need. So how do you solve it?

Bonus info would be to also measure dovecot traffic as well.

ervingsb
  • 395
  • 1
  • 6
  • 16

2 Answers2

3

For Postfix logs, how about isoqlog? It's a bit dusty and old, but generates nice HTML summaries. If you want a command line tool, pflogsumm is excellent.

I don't know about Dovecot statistics, I'm more familiar with Cyrus.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • ..and contains some primo PHP exploit opportunities. Please, avoid isoqlog like the proverbial. – adaptr Aug 02 '12 at 08:17
1

How much traffic is generated in what way ? Where ?
On the network, coming in, going out, being processed ?

You can parse the logs to determine how many messages are received, sent, etc - the well-known mailgraph webapp is good at that.

For actual message sizes per domain, you may be better off piping the postfix logs to a database, where they can be efficiently processed.

adaptr
  • 16,576
  • 23
  • 34