Salaam, Try using a tool like mailgraph or pglogsum
Regards, Muhammed Sameer --- On Wed, 6/3/09, no7find - <no7f...@gmail.com> wrote: > From: no7find - <no7f...@gmail.com> > Subject: [queues] - in/out messages > To: postfix-us...@cloud9.net > Date: Wednesday, June 3, 2009, 11:11 AM > Hi list ! > > I want to know if there is any way to find out the IN and > OUT messages > per queue (active, incoming, ...). And later I want to > estimate the > rate on each queue. > > The way I'm trying to this is by parsing mail.log file and > it require > to active verbose/debug mode of queue manager daemon. > > master.cf: > qmgr fifo > n - > n 300 > 1 qmgr -v > > The disadvantage is an increment of lines on the log file: > ~9 to ~123. > > = 9 lines = (without verbose/debug mode) > Apr 16 17:16:50 debian postfix/postlog[2258]: > =======================================================START(qmgr)= > Apr 16 17:16:56 debian postfix/smtpd[2259]: connect from > example.com[192.168.56.1] > Apr 16 17:16:56 debian postfix/smtpd[2259]: 3B22C4571: > client=example.com[192.168.56.1] > Apr 16 17:16:56 debian postfix/cleanup[2263]: 3B22C4571: > message-id=<20090416161656.3b22c4...@debian.lan> > Apr 16 17:16:56 debian postfix/qmgr[2251]: 3B22C4571: > from=<b...@debian.lan>, > size=348, nrcpt=1 (queue active) > Apr 16 17:16:56 debian postfix/smtpd[2259]: disconnect > from > example.com[192.168.56.1] > Apr 16 17:16:56 debian postfix/local[2264]: 3B22C4571: > to=<billga...@debian.lan>, > relay=local, delay=0.08, > delays=0.04/0.02/0/0.02, dsn=2.0.0, status=sent (delivered > to maildir) > Apr 16 17:16:56 debian postfix/qmgr[2251]: 3B22C4571: > removed > Apr 16 17:17:01 debian postfix/postlog[2265]: > =======================================================END(qmgr)= > > = 123 lines = (with verbose/debug mode) > Apr 16 17:52:27 debian postfix/postlog[3019]: > =======================================================START(qmgr > -v)= > Apr 16 17:52:44 debian postfix/smtpd[3022]: connect from > example.com[192.168.56.1] > Apr 16 17:52:44 debian postfix/smtpd[3022]: 809BB459F: > client=example.com[192.168.56.1] > Apr 16 17:52:44 debian postfix/cleanup[3026]: 809BB459F: > message-id=<20090416165244.809bb4...@debian.lan> > Apr 16 17:52:44 debian postfix/qmgr[3012]: > trigger_server_accept_fifo: > trigger arrived > Apr 16 17:52:44 debian postfix/qmgr[3012]: master_notify: > status 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: request: 87 (W) > Apr 16 17:52:44 debian postfix/qmgr[3012]: qmgr_scan_start: > start > incoming queue scan > Apr 16 17:52:44 debian postfix/qmgr[3012]: master_notify: > status 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_active_feed: queue incoming > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_active_feed: > incoming/809BB459F > > <-------------------------------------- IN to > incoming queue > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_message_alloc: active > 809BB459F > > <-------------------------------------- IN to active > queue > Apr 16 17:52:44 debian postfix/qmgr[3012]: 809BB459F: > recipient limit 5000 > Apr 16 17:52:44 debian postfix/qmgr[3012]: 809BB459F: > from=<b...@debian.lan>, > size=348, nrcpt=1 (queue active) > Apr 16 17:52:44 debian postfix/qmgr[3012]: start sorted > recipient list > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_message_sort: > billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: end sorted > recipient list > Apr 16 17:52:44 debian postfix/qmgr[3012]: connect to > subsystem private/rewrite > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > request = resolve > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr sender > = b...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > address = > billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: flags > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: flags > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: transport > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: transport > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: local > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: nexthop > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: nexthop > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: recipient > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: recipient > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: > billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: flags > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: flags > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: 256 > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/rewrite > socket: > wanted attribute: (list terminator) > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: resolve_clnt: > `...@debian.lan' > -> `billga...@debian.lan' > -> transp=`local' > host=`debian.lan' rcpt=`billga...@debian.lan' > flags= class=local > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 2 > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 0s > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 5s > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: dict_eval: > const 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_transport_create: > local concurrency 2 recipients 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: start sorted > recipient list > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_message_sort: > billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: end sorted > recipient list > Apr 16 17:52:44 debian postfix/qmgr[3012]: mail_flow_put: 1 > 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_transport_select: local > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_active_drain: allocate local > Apr 16 17:52:44 debian postfix/qmgr[3012]: connect to > subsystem private/local > Apr 16 17:52:44 debian postfix/qmgr[3012]: done incoming > queue scan > Apr 16 17:52:44 debian postfix/qmgr[3012]: transport_event: > local > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: (list terminator) > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_peer_select: 809BB459F > local billga...@debian.lan > (1 of 2) > Apr 16 17:52:44 debian postfix/qmgr[3012]: qmgr_job_retire: > 809BB459F > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr flags > = 3 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > queue_name = active > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > queue_id = 809BB459F > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr offset > = 594 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr size = > 348 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > nexthop = debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > encoding = > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr sender > = b...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > envelope_id = > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > ret_flags = 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr time = > [data 44 bytes] > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > log_client_name = > example.com > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > log_client_address = 192.168.56.1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > log_client_port = 49506 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > log_protocol_name = ESMTP > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > log_helo_name = bob.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > sasl_method = > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > sasl_username = > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > sasl_sender = > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > rewrite_context = remote > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > recipient_count = 1 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > original_recipient = billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > recipient = > billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr offset > = 570 > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > dsn_orig_rcpt = > rfc822;billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: send attr > notify_flags = 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: qmgr_deliver: > site > `billga...@debian.lan' > Apr 16 17:52:44 debian postfix/smtpd[3022]: disconnect > from > example.com[192.168.56.1] > Apr 16 17:52:44 debian postfix/local[3027]: 809BB459F: > to=<billga...@debian.lan>, > relay=local, delay=0.14, > delays=0.05/0.04/0/0.06, dsn=2.0.0, status=sent (delivered > to maildir) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: diag_type > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: diag_type > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: diag_text > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: diag_text > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: mta_type > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: mta_type > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: mta_mname > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: mta_mname > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: action > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: action > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: reason > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: reason > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: status > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > value: 0 > Apr 16 17:52:44 debian postfix/qmgr[3012]: private/local > socket: > wanted attribute: (list terminator) > Apr 16 17:52:44 debian postfix/qmgr[3012]: input attribute > name: (end) > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_queue_unthrottle: > queue billga...@debian.lan > Apr 16 17:52:44 debian postfix/qmgr[3012]: > qmgr_active_done: > 809BB459F > > <-------------------------------------- OUT from active > queue > Apr 16 17:52:44 debian postfix/qmgr[3012]: 809BB459F: > removed > Apr 16 17:52:44 debian postfix/qmgr[3012]: qmgr_job_free: > 809BB459F local > Apr 16 17:52:49 debian postfix/qmgr[3012]: rewrite stream > disconnect > Apr 16 17:52:56 debian postfix/postlog[3034]: > =======================================================END(qmgr > -v)= > > > > > Thanks && Best regards >