GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PREPFLOG(1) User Contributed Perl Documentation PREPFLOG(1)

prepflog.pl - Pre-processor for pflogsumm

prepflog.pl [-d <today|yesterday>][--syslog_name=string] [file1 [filen]]

prepflog.pl -[help|version]

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 scanner.

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 pflogsumm's 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 yesterday's 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.

--syslog_name=name

               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 you've 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):

        #!/bin/sh
        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 | \ 
                /usr/local/bin/pflogsumm

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 environment.

None known, but needs more testing.

Compatible with postfix 2.3 or later and pflogsumm 1.1.3

pflogsumm(1)

John Fawcett

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: john@voipsupport.it

The script is currently available at: http://www.voipsupport.it/

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, USA.

An on-line copy of the GNU General Public License can be found http://www.fsf.org/copyleft/gpl.html.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.