Manual Reference Pages - PREPFLOG (1)
prepflog.pl - Pre-processor for pflogsumm
prepflog.pl [-d <today|yesterday>][--syslog_name=string]
If no file(s) specified, reads from stdin. Output is to stdout.
Utility to filter out postfix log lines due to re-injection
into postfix of messages from a content filter or antivirus
Reads from input and writes to output intercepting and
disregarding lines which are related to the second
passage of messages through postfix.
The output is suitable to pass to pflogsumm and should avoid
pflogsumms double counting of these messages.
As with pflogsumm itself, only postfix lines are processed.
All other log lines are not passed on to the output.
A non standard syslog name can be handled via the
syslog_name parameter. Also log lines may be filtered by
today or yesterdays date.
-d today extract log lines just for today
-d yesterday extract log lines just for yesterday
-help Emit short usage message and bail out.
Set syslog_name to look for for Postfix log entries.
By default, prepflog looks for entries in logfiles
with a syslog name of "postfix," the default.
If youve set a non-default "syslog_name" parameter
in your Postfix configuration, use this option to
tell prepflog what that is.
-version Print program name and version and bail out.
Typical use of this pre-processor would be:
prepflog.pl -d yesterday /var/log/mail | pflogsumm.pl
Any other options can be specified to pflogsumm as normal.
The -d flag can however be omitted from pflogsumm if already
specified with prepflog.pl. It will do no harm if left.
If --syslog_name is used with prepflog.pl it must be specified
again with pflogsumm.
Processing of log files should be carried out just before
rotating them. Even so it is still possible to miss messages
unless processing considers all log files for a particular
day. A script that may be helpful for this is (which
considers that logfiles are compressed when rotated):
LASTLOG=`ls -t /var/log/mail*.gz | head -n 1`
/bin/zcat $LASTLOG | /bin/cat - /var/log/mail | \
/usr/local/bin/prepflog.pl -d yesterday | \
The current release is a beta version, which has
undergone internal testing. In particular it has not
been tested on a highly loaded server or a large
corpus of mail log examples
As always, use a program in a test environment until
you are comfortable about putting it into a production
None known, but needs more testing.
Compatible with postfix 2.3 or later and pflogsumm 1.1.3
This script has been adapted from the pflogsumm
written by Jim Seymour. Whole sections of pflogsumm
code have been imported here. The reason for this
is that having taken into account the way pflogsumm
works, it should be easier to integrate in the
future, if indeed that step is found to be a useful one.
Any feedback is welcome: email@example.com
The script is currently available at:
COPYRIGHT AND LICENSE
Copyright (c) 2004 John Fawcett
The parts of the code derived from pflogsumm are
copyrighted by Jim Seymour.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You may have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
An on-line copy of the GNU General Public License can be found
|perl v5.20.3 ||PREPFLOG (1) ||2016-04-03 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.