The following is quoted from Jim Seymour's Pflogsumm FAQ at
is a program that analyzes Postfix logs, including the logging from
rejected mail. If these logs contain text that was rejected by
body_checks patterns, then the logging is also likely to
be rejected by those same
body_checks patterns. This problem does
not exist with
header_checks patterns, because those are not applied
to the text that is part of the mail status report.
You configure Postfix to do body checks, Postfix does its thing,
Pflogsumm reports it and Postfix catches the same string in the
Pflogsumm report. There are several solutions to this.
Wolfgang Zeikat contributed this:
### Create a new message:
$msg = MIME::Lite->new(
From => '[email protected]',
To => '[email protected]',
# Cc => '[email protected], [email protected]',
Subject => 'pflogsumm',
Date => `date`,
Type => 'text/plain',
Encoding => 'base64',
Path => '/tmp/pflogg',
Where "/tmp/pflogg" is the output of Pflogsumm. This puts Pflogsumm's
output in a base64 MIME attachment.
Note by Wietse: if you run this on a machine that is accessible
by untrusted users, it is safer to store the Pflogsumm report in
a directory that is not world writable.
In a follow-up to a thread in the postfix-users mailing list, Ralf
"mpack does the same thing."
And it does. Which tool one should use is a matter of preference.
Other solutions involve additional
body_checks rules that make
exceptions for daily mail status reports, but this is not recommended.
Such rules slow down all mail and complicate Postfix maintenance.