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


Manual Reference Pages  -  PREPFLOG (1)

.ds Aq ’

NAME

prepflog.pl - Pre-processor for pflogsumm

CONTENTS

SYNOPSIS

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.

DESCRIPTION

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.

OPTIONS

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

EXAMPLES

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



CAVEATS

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.

BUGS

None known, but needs more testing.

NOTES

Compatible with postfix 2.3 or later and pflogsumm 1.1.3

SEE ALSO

pflogsumm(1)

AUTHOR

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

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

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


perl v5.20.3 PREPFLOG (1) 2016-04-03

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