Am 21.08.2016 um 14:13 schrieb Wietse Venema: > Robert Schetterer: >> Am 21.08.2016 um 05:10 schrieb Steve Atkins: >>> I find I need to extract a list of deliveries, and delivery attempts, from >>> postfix logs. Ideally I'd like to feed /var/log/mail.log into some script >>> and get out something like {timestamp, peer ip, helo, envelope from, >>> recipient, message-id} for every email. >>> >>> Does anyone know of a log analyzer or some other script that'll do that? >>> >>> Cheers, >>> Steve >>> >> >> http://linux.die.net/man/1/pflogsumm >> https://github.com/benningm/saftpresse >> https://sourceforge.net/projects/logwatch/ > > There also is auxiliary/collate/collate.pl in the Postfix 3.2 > source-code distribution. > > "This script, by Viktor Dukhovni, untangles a Postfix logfile and > groups the records one "session" at a time based on queue ID and > process ID information. Records from different sessions are separated > by an empty line. Such text is easy to process with $/="" in perl, > or RS="" in awk." > > With the logging organized by email "session", all you need > is a script that picks out the desired fields. > > Wietse >
that sounds great Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG, 80333 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein