On Tue, Mar 31, 2020 at 12:58:56AM -0700, Owais Khan wrote: > and is there any way i could exactly count sent mail from a particaular "from > id" other than pflogsumm utility.
Perhaps you'll find "collate" useful: https://github.com/vdukhovni/postfix/tree/master/postfix/auxiliary/collate It does often require minor adjustment to its regular expressions for matching the initial portion of your log messages, whose format is system-dependent: https://github.com/vdukhovni/postfix/blob/master/postfix/auxiliary/collate/collate.pl#L9-L12 to search for a multi-line block (delimited by blank lines) match a particular pattern, I use: $ perl -ne ' BEGIN {$/="\n\n"} print if m{some-perlre-pattern} ' [input files... (or else stdin) ] -- Viktor.