On 13 Jul 2018, at 13:39, rog7...@web.de wrote:
Hello,
I'm looking for a search tool to analyze Postfix logfiles. It should
be something like a multiline grep application which is able to show
all lines, which are related to one incoming mail. Mainly I want to
search for the sender and the recipient at the same time. E.g.
something like that:
mailgrep "from=<local1@domain1>.*to=<local2@domain2>"
/var/log/mail.log
I assume, that I'm not the first Postfix user with this requirement.
But I couldn't find a suitable tool. Does somebody know an adequate
application or do I have to write it for my own?
If you haven't looked at the list of tools at
http://www.postfix.org/addon.html#logfile then you should start there.
The only one I've used is pflogsumm, but it isn't what you're looking
for.
I address this by having a milter I already use for other things
(MIMEDefang) log a suitable summary line for every message.