On Sun, May 30, 2021 at 12:04:41PM -0400, Bill Cole wrote:
> It's named collate.pl, included in the Postfix source distribution:
>
> sc1:bill$ cat postfix-3.6.0/auxiliary/collate/README
> 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.
>
> Usage:
> perl collate.pl file...
>
> It reads standard input when no file is specified.
One caveat: the Perl code often needs to a minor edit to tweak it to
match the date + hostname portion of log messages.
--
Viktor.