Francesco
Francesco

Reputation: 11

Postfix statistics of each user, how do?

Virtually use debian with postfix and mysql. I want to know how many emails for each user sends.

All statistics programs are generalities, I would like to know the specific number for each person who uses postfix.

example: I have 3 accounts postfix

  [email protected]
  [email protected]
  [email protected]

For each of them get statistics

  [email protected]
  sent 150email
  [email protected]
  sent 425email
  [email protected]
  sent 2email
  etc. ....

Is there a way? Thanks in advance :)

Upvotes: 1

Views: 3543

Answers (1)

clement
clement

Reputation: 3375

Try using postfix-logwatch

# Sample Usage
perl postfix-logwatch --nosummary --nodetail --limit envelopesenderdomains='2 1:10: 2:8:'  /var/log/maillog
# Command says Give 2 level output in which give top ten domains in level one( 1:10:) and top 8 users in each domain ie. level two ( 2:8: )

****** Detail (2) **********************************************************************************
   72488   Envelope sender domains -----------------------------------------------------------------
   14055      intranet.domain1.com
    6912         domain1-owner
    1203         owner
     486         cmowner
     370         sysaduser
     219         cowner
     185         towner
     175         autoowner
     167         cpanel-owner
                 ...
    8867      live.com
    8867         postman
    7635      *unknown
    7635         <>
    6172      domain2.com
     895         keybox
     588         autoearn
     480         autesting
     322         audit
     231         k_crawler
     120         user8
      94         mon
      80         orderadmin

Upvotes: 2

Related Questions