I use this line : tail -f /var/log/mail.log | egrep --line-buffered 'Relay' | egrep --line-buffered -v '(Process_Control|notifications.systemes|PODCAST-|Admin-ch|PUB_CONTROL|@mydomain.tld|r...@mydomain.tld' | sed -u 's/messagerie-prep amavis.*},//;s/Hits:\([^,]\+\).*/HITS:\1/; s/\(Queue-ID\|Message-ID\).*, HITS/Hits/'|grep "$REGX_EMAIL ->"
This will strip out automatic notifications and give me output like this : Mar 28 16:25:24 LOCAL [127.0.0.1]:47600 <wassila.bes...@mydomain.tld> -> <a.gheba...@mydomain.tld>,<r.bena...@mydomain.tld>, Hits: -0.999 One can tee this into a file and build from there. You can do basic stuff with the (sort | uniq -c | sort -n) pipe machine. On Wednesday, March 28, 2018, 3:09:24 PM GMT+1, Poliman - Serwis <ser...@poliman.pl> wrote: Thank you, I will check it. I am looking for information which linux user sends email and how many, for example, per hour, day. That would be perfect plugin. 2018-03-28 15:59 GMT+02:00 Matus UHLAR - fantomas <uh...@fantomas.sk>: Poliman - Serwis: Hi people. Do you know is there any tool/plugin for monitoring outgoing emails from server with postfix? Maybe postfix has this feature? On 28.03.18 09:57, Wietse Venema wrote: Postfix logs all transactions. I suggest that you look for tools that analyze Postfix logs. pflogsumm, for example. available in most OS/distribution repositories and at: http://jimsun.linxnet.com/post fix_contrib.html -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. M$ Win's are shit, do not use it ! -- Pozdrawiam / Best Regards Piotr Bracha