PrePflog: Difference between revisions

From voipsupport
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==What is it?==
==What is it?==


PrePflog tries to solve the issue of double counting of email in Awstats or Pflogsumm.
PrePflog tries to solve the issue of double counting of email statistics in [http://www.awstats.org Awstats] or [https://jimsun.linxnet.com/postfix_contrib.html/ Pflogsumm].


The double counting occurs when Postfix is used with an after queue content filter (like Amavisd-new). The email passes through postfix twice, once before handing off to the filter and then when the email is received back from the filter for final delivery or forwarding. Each passage through Postfix generates email log entries.
The double counting occurs when Postfix is used with an after queue content filter like Amavisd-new. The email passes through Postfix twice, once before handing off to the filter and then when the email is received back from the filter for final delivery or forwarding. Each passage through Postfix generates email log entries.


It is a known issue that in this case Pflogsumm produced email statistics which were multiplied by two. No easy way of solving this in Pflogsumm was available.
It is a known issue that Pflogsumm produced email statistics which were multiplied by two. No easy way of solving this in Pflogsumm is available. See https://jimsun.linxnet.com/downloads/pflogsumm-faq.txt FAQ 14.


This script sanitizes the log files to disregard the lines relating to the re-injection of the same message.
This script sanitizes the log files to disregard the lines relating to the re-injection of the same message.
The script sanitizes mail log files that are to be passed to pflogsumm or awstats disregarding the lines relating to the re-injection of messages into postfix. I use it with amavisd-new configured as a postfix after queue content filter which does anti spam checks through spamassassin and antivirus checks through a third party virus checker. If your postfix setup requires additional content filters resulting in 3 or more passages of the same message through postfix, this script will not work for you.
AN ALTERNATIVE WAY TO SOLVE THE DOUBLE COUNTING PROBLEM is to use multiple postfix instances each with a different syslog name. In that way you can process only the log entries from one of the instances via pflogsumm. Although it may take a bit more work to set up, it is a more robust method since it does not rely on updates to prepflog if log file formats change and you are not parsing the log file twice.
The preprocessor script could be of help if you use:
    postfix 2.1 or higher
    and content filtering or antivirus scanning (such as amavisd-new) which results in a re-injection of messages to postfix
    and either Jim Seymour's pflogsumm utility for postfix stats (pflogsumm 1.1.0)
    or awstats 6.4
Dynamic Routes is a FreePBX module. [[http://www.freepbx.org FreePBX]] is a GUI which allows administrators to configure the [http://www.asterisk.org Asterisk] communications platform without writing Asterisk dial plan code or configuration files. Dynamic Routes adds to the FreePBX functionality, by configuration of call routing based on the result of a lookup.
Originally Dynamic Routes allowed lookups only to a MySQL database. In the latest version there are many more lookup methods. However the principle is still the same: to allow data dependent call routing.
==What could I use it for?==
The potential uses are many. Here are some examples:
* screen calls to a support hotline according to agreed support methods and service levels
* route calls to a dedicated agent or queue by customer category or importance
* play different announcements to different callers
* basically anything where you want the call to go to a different destination depending on some known data (like the Caller id) or data input by the customer using DTMF keypad (like contract id)


==How do I get it?==
==How do I get it?==


The code for the project is hosted on github. Please see: [https://github.com/johnfawcett/dynroute/ Dynamic Route source code repository]
The code for the project is hosted on github. Please see: [https://github.com/johnfawcett/prepflog/ PrePflog source code repository]
 
===FreePBX 13 support===
 
[https://github.com/johnfawcett/dynroute/archive/13.0.4.zip Dynamic Routes 13.0.4]
 
This version has been rewritten to comply with the FreePBX 13 framework. Any new features are added to this version. You may use this version to upgrade from a previous 13.x version or 2.11 version. This version may not be used on previous versions of FreePBX.
 
[https://github.com/johnfawcett/dynroute/blob/master/CHANGES.txt Dynamic Routes Change Log]
 
===FreePBX 11 and 12 support===


[https://github.com/johnfawcett/dynroute/archive/2.11.3.2.zip Dynamic Routes 2.11.3.2]
[https://github.com/johnfawcett/prepflog/archive/0.4.1.zip PrePflog 0.4.1]


This version will continue to be supported in the case of bug fixes or security issues at least until the FreePBX versions themselves reach their end of life for support, but no new enhancements will be made.
[[PrePflog Change Log]]


Previous versions are archived for historical reference but are no longer maintained and should not be used: [[Dynamic Routes previous versions]]
Previous versions are archived for historical reference but are no longer maintained and should not be used: [[PrePflog previous versions]]


GPG signatures for the latest versions are available here [[Dynamic Routes gpg signatures]]
GPG signatures for the latest versions are available here [[PrePflog gpg signatures]]


==Where can I get more information?==
==Where can I get more information?==

Latest revision as of 00:06, 14 June 2016

What is it?

PrePflog tries to solve the issue of double counting of email statistics in Awstats or Pflogsumm.

The double counting occurs when Postfix is used with an after queue content filter like Amavisd-new. The email passes through Postfix twice, once before handing off to the filter and then when the email is received back from the filter for final delivery or forwarding. Each passage through Postfix generates email log entries.

It is a known issue that Pflogsumm produced email statistics which were multiplied by two. No easy way of solving this in Pflogsumm is available. See https://jimsun.linxnet.com/downloads/pflogsumm-faq.txt FAQ 14.

This script sanitizes the log files to disregard the lines relating to the re-injection of the same message.

How do I get it?

The code for the project is hosted on github. Please see: PrePflog source code repository

PrePflog 0.4.1

PrePflog Change Log

Previous versions are archived for historical reference but are no longer maintained and should not be used: PrePflog previous versions

GPG signatures for the latest versions are available here PrePflog gpg signatures

Where can I get more information?