ChangeLog for pflogsumm [Notes: Let me know if you would like to be notified as new versions are released. The latest released version can always be found at http://jimsun.LinxNet.com/postfix_contrib.html. As of 2025-07-30 the pflogsumm project page, above, supports an Atom feed for update notifications.] rel-1.3.0beta01 20260820 Other than the below-noted documentation updates, this is simply a promotion of 1.2.2alpha02 to Beta status. Documentation Updates: - pflogsumm-faq.txt renamed to FAQ and extensively updated - README renamed to INSTALL and updated - README.md created - ToDo renamed to TODO Version Numbering Change With this release there will be a change in the way pflogsumm versioning is done. - Rather than bumping the third digit of version numbers for Alpha or Beta releases, new Alpha and Beta releases will take the next Production release's version number, with "alphaNN" or "betaNN" appended. - The last digit of the version number will be reserved for patch releases. Alpha and Beta versions of a patch release will retain that patch version through Production. I decided on this approach after discovering some consumers were mistaking Beta releases for Production releases. rel-1.2.2alpha02 20260815 Added --suppress option, allowing one to suppress selected report sections. Current report section options are: host/domain - suppress all host/domain summaries per-hour - suppress all per-hour/-day statistics rdns-warnings - suppress all "does not resolve to address" rDNS warnings size-detail - suppress per-user message size detail "--suppress help" lists the available report suppression options rel-1.2.2alpha01 20260814 Now catches "removed (canceled)" log entries. Such messages are no longer counted as received. New Grand Totals value added: "removed (canceled)" rel-1.2.1 20260422 This release begins the next Beta cycle following the 1.2.0 Production release. Minor reject messages improvement: Now includes client domain or IP address in "Sender address rejected..." reports and --rej-add-to will add the intended destination address. rel-1.2.0 20260422 This release promotes 1.1.15 from Beta to Production status; no code changes have been made since that version. The changes since 1.1.6, the last Production release, are substantive, including: - Config-file support - Enhanced TLS reporting - Improved parsing accuracy - Codebase refactoring for improved maintainability and robustness - Numerous usability improvements The only other difference with this release is the addition of a LICENSE file. rel-1.1.15 20260313 Breaking Changes Option --smtp-detail Did not enable SMTP detail as documented; rather it enabled reporting of SMTP session exceptions. These are now always reported. --smtp-detail is reserved for future use. This switch is deprecated and emits a warning. Option --smtpd-warning-detail Replaced by --warning-detail. This option affected reporting for *all* Postfix services, thus the rename. --smtpd-warning-detail still works, but is deprecated and its use emits a warning. Option --debug/-x Now requires a filename and writes debug output there. STDERR is no longer used for debug messages. Un-Breaking Change Option --verp-mung The argument is once again optional. Although prior documentation described it as optional, it accidentally became required in v1.1.12. The historical behavior has been restored. Bug Fixes "Messages with no size data" detection was occasionally mis-firing. Fixed. Enhancements Added --ssl-tls-stats to report - SMTP TLS stats - SMTPD TLS/SSL errors by remote host. N.B.: Requires Postfix-3.11 or later for SMTP TLS stats; otherwise the requisite SMTP TLS logging data is absent. Catches more smtp exceptions Several reports (messages expired, deferrals, others) now list only FQDNs, rather than FQDNs and associated IP addresses, for reduced noise. Major refactoring--eliminating no-op branches, duplicated code, questionable logic, and streamlining many regular expressions. Extensive regression testing revealed no change in report output beyond what's noted above. Documentation cleanup and corrections. rel-1.1.14 20260209 Bug Fixes Date range not displayed in multi-day reports for January (month 0). Enhancements Now captures and reports messages expired (queue lifetime exceeded). Thanks and a tip o' the hat to Bill Carson (bill-carlson-at-wkks-dot-org) for bringing this to my attention. Modified status line capture to account for new TLS status logging. (N.B.: Not currently doing anything with the captured TLS info.) Now condenses "Domain does not accept mail (nullMX)" under single subheading. Added long-form options to doc header and --help output. Miscellaneous A bit of minor refactoring. rel-1.1.13 20251023 Bug Fixes Corrected client-info extraction which sometimes extracted the wrong bits from log lines. (Bug introduced in v1.1.12.) Restored --zero-fill option accidentally dropped in v1.1.12 Cleanup/Maintenance Removed redundant parentheses from several regex capture assignments, improving readability without altering behavior. Simplified IPv4 octet parsing expression. Simplified reject/hold/discard capture assignment. Normalized unparsed deferral handling: now labeled as `(unknown host)` instead of a fabricated sentence. Strip trailing port suffixes from hostnames/IP addresses for cleaner aggregation. Improved domain normalization in all summaries for better host/domain aggregation. rel-1.1.12 20250819 *** Breaking Changes *** Date::Calc now Required due to date(-range) enhancements. UI Changes Options using underscores have been restored (reversing removal in v1.1.8). Their use now results in a prominent "deprecated" message in the report. Support for underscores will be removed after a suitable deprecation period. (N.B: This was accomplished without re-introducing Bugzilla bug 1931403.) Renamed option --unprocd to --unprocd-file for better clarity. (--unprocd was introduced in v1.1.11.) Changed --pscrn-detail option to behave like all other report-limiting options: Full detail unless this option is specified to limit or suppress it. (--pscrn-detail was introduced in v1.1.11.) Added support for a config file via --config. Command-line arguments override config file for non-boolean options. Note: This option requires the Config::Simple Perl module. (Only required if --config is used.) Added long-form options --date-range, --extended-detail, --host-cnt, --quiet, and --user-cnt to facilitate more user- friendly configuration files. Short-form options are retained for command-line use. Added --dump-config as a configuration creation/debugging aid. Expanded -d/--date-range options to include today, yesterday, this/last week/month, and specific date and date ranges in ISO 8601/RFC 3339 format. N.B.: Sadly, the extended date range options come with an unavoidable processing performance penalty. This is because the only reasonable way to do it was to convert everything into decimal values. Added --dow0mon (day of week 0 is Monday) for use in conjunction with this/last week date ranges. (Default is Sunday.) Added support for log entries with RFC 5424/3164-style fields and optional syslog version (e.g., "<123>1 ..."). Reports now display a date range at the top when processing multi-day or multi-date logs. Set default output column width to 80 columns, consistent with documentation. Squashed another, hopefully the last, bug that would sometimes lead to inaccurate tallying of messages received. Belated note: --rej-add-from/--rej-add-to always include "<" and ">", respectively, since v1.1.7. rel-1.1.11 20250530 Now requires Perl v5.10.0 minimum. Added support for postscreen summary and detail data: --pscrn-stats - display postscreen summary stats --pscrn-detail [cnt] - emit detailed postscreen data, optionally to the top [cnt] events. Improved host/domain/IP address normalization. Now normalizes IPv6 addresses. Bugfix: Potential undefined variable condition in get_smh. (Derives seconds, minutes, and hours from seconds.) Cosmetic: Fixed displayed single-digit day-of-month in report heading when "-d " specified. (Broken in v1.1.6) Added day-of-week to report heading when "-d " specified. Now always displays "Postfix Log Summaries" heading. Minor code optimizations to employ defined-or ("//") and reduce from List::Util. Added -x (debug) option. Debugging emitted to STDERR Added --unprocd option. Unprocessed log lines written to specified filename. rel-1.1.10 20250529 Bugfix: Messages rejected in latter SMTP processing, after they'd already been assigned a queue i.d., were incorrectly counted as received. Bugfix: postscreen reject detail processing was inadvertently hobbled in 1.1.7 as a side-effect of streamlined host/domain/ip-address parsing. Fixed. rel-1.1.9 20250527 Bugfix: Messages rejected in cleanup were incorrectly counted as received. Bugfix: In the unlikely (?) event a qid was used more than once in the same logfile input only the size of the message with the first occurrence of that qid would be counted. Bugfix: Eliminated errant debugging message that escaped my attention in versions 1.1.7 and 1.1.8. Documentation bugfix: "Addresses" misspelled as "adresses." Thanks and a tip o' the hat to Sven Hoexter (sven-at-stormbind-dot-net) for the heads up. rel-1.1.8 20250525 Removed the following deprecated options --no_bounce_detail --no_deferral_detail --no_reject_detail --no_smtpd_warnings pflogsumm no longer accepts underscores ("_") as part of option names. (Note: this finally addresses four-year-old Bugzilla bug 1931403.) Code cleanup: Changed some variable constants to true constants. Added test for reject type "BDAT" (Thanks to Maxim, admin-at-modum-dot-by, for the heads up.) Fixed unitialized $hostID value bug-reported to OpenSUSE. Thanks to Sven Uebelacker (uebelhacker) for the bug report. I *suspect* that, with an earlier fix I applied, that undefined value will no longer occur, but this fix certainly won't hurt anything--just in case. Added -srs-mung option. Thanks and a tip o' the hat to Tom Hendrikx (tom-at-whyscreem-dot-net) for the contribution. rel-1.1.7 20250524 Added parsing for "Recipient address triggers...," as in DISCARD on recipient actions. Improved "deferred" and "bounce" detail Added --use-orig-to switch, which causes the value of the "orig_to" field to be reported, rather than that of the "to" field, when "orig_to" is present. (This was long-ago requested by Tony Earnshaw and was overlooked by me. My apologies, Tony.) Added --rej-add-to switch, which adds the target email address to sender and client reject reports. (This was also long-ago requested by Tony Earnshaw.) For client rejects this could have created an ambiguity: If only either --rej-add-from or --rej-add-to was specified, you'd have no way of knowing, after-the-fact, which address was reported. So "<" and ">" have been added, to indicate "from" and "to," respectively. If both are specified, you get "from -> to." Added --colwidth switch, to allow adjustment of report's output width. (Default remains at 80 columns.) N.B.: --verbose-msg-detail overrides Now condenses deferrals in a manner similar to bounces. Now condenses warnings in a manner similar to reject reports. Made count reporting more consistent. Now each reporting section shows the item count in parenthesis (e.g.: "(nn)") or, if the count is limited and less than full count, as "(top nn of nn)". Suggestion by Michael Rasmussen (michael-at-michaelsnet-dot-us), tho not done in the way he suggested. Fixed policyd-spf-perl log line detection. Fixed conversation/lost connection while sending/receiving deferral detection Improved "said:" string trimmer to be a mite less aggressive when it didn't have to be. Improved reject report consolidation. In Host/Domain Summary: Message Delivery: Changed "sent cnt" to "msg cnt" since we're talking about messages delivered, not necessarily "sent," per se. Fixed bug in smtpd "disconnect from" parsing and streamlined. Removed superfluous additional "bounced" processing Caught another warning message Catch "Server configuration error" lines. Enhanced FQDN/IP addr/domain name parsing (in gimme_domain()): . More exhaustive IPv6 address check . Handles IPv6-mapped-IPv4 addresses . Properly handles the newer, longer TLDs . Treats in-addr.arpa and ip6.arpa FQNS like "unknown"s . More streamlined Added pffrombyto and pftobyfrom command-line utilities to the distribution. (Actually in 1.1.6.) rel-1.1.6 20250522 Renamed from "pflogsumm.pl" to "pflogsumm" Merged Debian patches through 1.1.5-8. Following are excerpted from Debian changelog. Fix regex in milter-rejects patch. Kudos to Andreas Jaggi for the report and patch. (Closes: #1027829) Update postscreen-rejects patch with a fix for IPv6 addresses. Kudos to Juri Haberland for the fix. (Closes: #955627) Add patch to count milter rejects provided by Matus Uhlar. Import postscreen support patch provided by Matus Uhlar d/patches/postscreen-rejects (Closes: #861402) Now matches "traditional" log date strings with either leading space or leading zero on single-digit days. (Debian bug report 1068425) Improvement to "unprocessed" debugging code--used for maintenance only. rel-1.1.5 20120205 Fixed RFC 3339 support. Releases 1.1.3 and 1.1.4 were badly broken in this respect. Thanks and a tip o' the hat to Sven Hoexter (sven-at-timegate-dot-de) for the help. ETA (2025-05-21): From Debian changelog: Thanks to Mihai Stan for the bugreport and the initial patch. rel-1.1.4 20120201 Modified for compatibility with -o syslog_name=blurfl/submission and -o syslog_name=blurfl/smtps set in master.cf. (These are the defaults in Postfix 2.9 and beyond.) N.B.: This doesn't mean you'll get submission and smtps broken-out separately from plain old smtp, it simply means the presence of the new sub-strings won't break Pflogsumm. Changed "_"s (underscores) in option switches to "-"s (dashes). (Underscores are still accepted.) Thanks and a tip o' the hat to David Landgren (david-at-landgren-dot-net) for the suggestion. Removed switches deprecated in 1.1.3 from the docs. Improved ISO timestamp parsing to account for optional fractional seconds part. (This is thrown-away by Pflogsumm.) Minor updates to the FAQ. Replaced "depreciated" with "deprecated" throughout. Thanks and a tip o' the hat to Rob Arista for the heads-up. Fixed bug in host normalization function that was broken for IPv4 addresses. rel-1.1.3 20100320 Added long-awaited switches to optionally reduce detail reporting: --bounce_detail=N, --deferral_detail=N, --reject_detail=N, --smtp_detail=N, smtpd_warning_detail=N, and --detail=N. Setting any of them to 0 suppresses that detail entirely. --detail=N sets the default for all of them, as well as for -u=N and -h=N. With the above enhancements, the following switches are deprecated, and will eventually be removed: --no_bounce_detail, --no_deferral_detail, --no_reject_detail and --no_smtpd_warnings. They are replaced by setting the desired --*_detail=0. They still work, but using them generates a warning. Added support for parsing logs with RFC 3339 timestamps. Thanks and a tip o' the hat to sftf-at-yandrex-dot-ru for the heads-up and the code contribution. (N.B.: My code does not require a command-line switch. The format is detected automatically.) Fixed some --ignore-case inconsistincies. Thanks and a tip o' the hat to Richard Blanchet (richard-dot-blanchet-at-free-dot-fr) for the heads-up and the diff. Fixed parsing bug that resulted in attempts to treat kind-of-IPv4-looking strings as IPv4 addresses. (I really need to improve reject/defer/etc. "reason" parsing to fix this properly.) Thanks to Joseph Vit (jvit-at-certicon-dot-cz) for the bug report. rel-1.1.2 20080629 Fixed bug with calculating yesterday's date in vicinity of DST changes. (Thanks and a tip o' the hat to Wieland Chmielewski for bringing the problem to my attention.) Added missing "underlining" to some (sub-)section titles for consistency. rel-1.1.1 20070406 Fixed to parse Postfix-2.3 (and beyond) logfiles. Thanks to whomever contributed to http://bugs.gentoo.org/show_bug.cgi?id=144236 Removed support for vmailer. Removed "SMTPD_STATS_SUPPORT" "fences" in code in favour of code to automatically detect the availability of Date::Calc. If --smtpd_stats is specified and Date::Calc is not installed, now bails-out with friendly message. (Adapted from suggestion and examples provided by David Landgren . Thanks!) Removed rem_smtpd_stats_supp.pl utility from distribution. (No longer needed.) Memory footprint improvement: Pflogsumm no longer stores data for reports that are supressed via --no_ switches. Removed extraneous arguments in two calls to print_nested_hash that would result in the "quiet" flag being ignored. Thanks to Pavel Urban (pupu-at-pupu-dot-cz) for bringing that to my attention. Added notes to FAQ about translations and i18n, about mismatching "received"/"delivered" counts, about bug in calculating "yesterday," and about John Fawcett's "prepflog." rel-1.1.0 20031212 Promoted 1.0.18 (Beta) to "production/stable" version release. rel-1.0.18 20031204 Fixed reject parsing for "DATA" smtpd rejects. rel-1.0.17 20031129 Fixed reject parsing to properly recognize bare "User unknown". (Thanks to J.D. Bronson" for the bug-report and sample logfile lines.) rel-1.0.16 20031128 Re-worked "to" and "from" field parsing in reject report handling to make it more robust in pathological cases. (Thanks to Paul Brooks and Lars Hecking for the bug-reports and sample logfile lines.) Fixed warnings resulting from non-standard, extraneous syslog input. (Thanks to Mathias Behrle for the report.) Fixed reject parsing to account for really atrocious garbage in HELO strings, sender addresses and recipient addresses. (Thanks to Lars Hecking for the bug-report and sample logfile lines.) Fixed reject parsing to properly recognize "CONNECT" smtpd rejects. (Thanks to Mike Vanecek for the bug-report.) Fixed reject parsing to properly recognize "User unknown in relay recipient table." (Thanks to Lars Hecking for the bug-report and sample logfile lines.) Some code optimization resulting in 3-5% performance improvement. rel-1.0.15 20030914 Pflogsumm *should* now properly parse and handle log entries with IPv6 addresses in them. (Adapted from idea and code submitted by Stefan `Sec` Zehl .) Fixed "User unknown in local recipient table" reject reports to show target recipient address, rather then sending domain, to be consistent with other "recipient" reports. (Thanks to WC Jones for the suggestion.) Fixed parsing of "Recipient address rejected" for recipient address verification (RAV) rejects. (Thanks to Len Conrad for the suggestion.) FAQ additions regarding recommendations on how to format custom reject reports for "best" results in Pflogsumm's output and note regarding "non-standard" syslogd's. rel-1.0.14 20030909 Fixed bug in parsing for "Host/Domain Summary: Messages Received" report improvement (rel-1.0.13) that resulted from (unexpected, to me) lines such as ... postfix/smtpd[31430]: E02DDB04E: client=blurfl[1.2.3.4], sasl_method=LOGIN, sasl_username=phred rel-1.0.13 20030907 The "Host/Domain Summary: Messages Received" report would show simply "from=<>", for the host/domain, for postmaster bounces. Pflogsumm now substitutes the client hostname or IP address for these, unless it's from the pickup daemon, in which case "from=<>" is retained. (Note that "Senders by message count/size" reports are unaffected by this change.) "Senders by message count" and "Recipients by message count" reports are now secondarily sorted by domain, host and user parts. (As a side-effect: So are "Senders by message size" and "Recipients by message size" but, being as the odds are against numerous senders and recipients having the same total message sizes, this change hasn't much effect with those.) rel-1.0.12 20030902 Rejects, warns, etc. now print sub-category totals. E.g.: message reject detail --------------------- RCPT Relay access denied (total: 6) (Adapted from idea and code submitted by blake7-at-blake7-dot-org.) Reject, warning, etc. reports are now sorted by 2nd column (e.g.: IP address, domain, etc.) within count. (Adapted from idea and code submitted by David Landgren .) Added --no_smtpd_warnings (report) option. Added --no_no_msg_size (report) option. A couple of minor improvements to reject parsing/reporting. rel-1.0.11 20030617 This is a bug-fix release. There was a problem in the way pflogsumm-1.0.8 through 1.0.10 handled the --syslog_name option: When --syslog_name was specified, some log entries with the default "postfix" name would be missed. This revision may introduce incompatibilities if you're logging two or more instances of Postfix to the same log. See the docs included in the tarball for details. rel-1.0.10 20030219 Re-worked "% rejected" calculation to include messages discarded and added "% discarded" calculation/display. rel-1.0.9 20030217 Bugfix: If Perl's -w is specified at run-time and there were no messages delivered or rejected, uninitialized variable warnings would be issued in the percent rejected calculation code. Thanks for Larry Hansford (and many others since!) for the bug report. rel-1.0.8 20030216 Bugfix: Fixed problem with "orig_to=" being parsed as "to=". This resulted in *very* wrong output. Thanks to Bjorn Swift for the report. Added "% rejected" to Grand Totals "rejected" figure. This is calculated as: rejected / (delivered + rejected). (I did this purely because it amuses me.) Bugfix: Fix, in reject processing, for truncated overly-long "to" fields. Thanks to Rick Troxel for reporting the problem. Added --syslog_name option. Thanks to Ben Rosengart for the suggestion. rel-1.0.7 20021231 Corrected and improved message reject/reject warn/hold/discard parsing. Again. (Thanks to Peter Santiago for reporting the problem that initiated these improvements.) rel-1.0.6 20021230 Added support for reporting message reject warnings, holds and discards. Note: Message rejects, reject warnings, holds and discards are all reported under the "rejects" column for the Per-Hour and Per-Day traffic summaries. More aggressive verp munging (again). (Prompted, in part, by a suggestion from Casey Peel. Thanks!) Verp munging now applied to sender addresses in smtpd reject reports. WARNING: Please note that verp munging is highly experimental! Pflogsumm distribution changed to gzip'd tarball format. Tightened-up parsing. Thanks for Ralf Hildebrandt for noting and reporting the problem. Docs at the top of pflogsumm.pl changed to POD format for automated manpage generation. README added. Automatically-generated manpage added. "To Do" moved out of ChangeLog into separate file. Package now includes convenience Perl script for removing smtpd stats support for those who don't have Date::Calc, don't want to install it and don't care about smtpd stats reporting. Belated thanks to Len Conrad in regards to the Sender Address Verification work in 1.0.5. rel-1.0.5 20021222 Fixed to parse smtpd rejects for Postfix versions as of 20021026. (Retained compatibility with older versions of Postfix.) Note: smtpd and header-/body-checks warn, hold and discard messages are *not* currently parsed/reported. I'll need to get some logfile entries. Fixed parsing to handle the new "sender address verification" lines. Added "--zero_fill" option to put zeros in columns that might otherwise be blank in some reports. (Suggestion by Matthias Andree). Fixed "Message size exceeds fixed limit" parsing for reject reporting. rel-1.0.4 20020224 Added "--no_*_detail" options. (Suppresses some of the "detail" reports.) Added "--version" option. (Thanks to "Guillaume") Improved handling of "[ID nnnnnn some.thing]" stuff (Thanks to Blake Dunmire) Repaired and optimized some of the "reject" parsing. Added processing and report of smtp delivery failures. Added --rej_add_from option: For those reject reports that list IP addresses or host/domain names: append the email from address to each listing. (Note: does not apply to "Improper use of SMTP command pipelining" report.) rel-1.0.3 20010520 Minor re-work of "reject: RCPT" parsing to account for Yet Another Change in the logfile format. (Semi-colon changed to a comma in "blocked using rbl.maps.vix.com,".) rel-1.0.2 20010519 Took another whack at "verp" munging. *sigh* Added code to summarize "Improper use of SMTP command pipelining" rejects by client. rel-1.0.1 20010518 Modified to catch "reject: header" log entries changed as of postfix release-20010228 (?). Prior versions of postfix had the string "warning: " (where the qid normally is). Thanks to Glen Eustace , Len Conrad , Daniel Roesen , Milivoj Ivkovic and j_zuilkowski@hotmail.com (Jon Zuilkowski) for reports and/or patches. Fixed a couple of "uninitialized variable" problems. Committed (actually starting with 20000925-01beta) to CVS. 20000925-01 Added a line to compensate for (new?) "[ID nnnnnn some.thing]" sub-strings that appear in logfile entries under Sun Solaris 8. (At least. Others?) Note: Upon being committed to CVS, this became rel-0.9.0. 20000916-01 Forgot to add "--problems_first" to the "usage" output and in the synopsis at the top of the comments. 20000908-01beta Re-did what 20000907-02beta was *supposed* to be! To wit: replaced missing "--ignore_case" bugfix, "panic" entry processing, improvements to "fatal" and "warning" message reporting and missing "--mailq" option. (Obviously: 20000907-02beta was derived from the wrong code base.) 20000907-02beta Fixed bug in ISO date formatting that caused the month to be off by one. Thanks to Kurt Andersen for the report and the patch. Fixed overflow of connect time reporting into days. (Can happen during weekly summaries for sites with large volumes of email.) Thanks again to Kurt Andersen for the report and the fix. Improved "rejects" reporting *again*. Thanks to Thomas Parmelan for the patch. Added "--problems_first" option to print "problem" reports such as bounces, defers, warnings, fatal errors, etc. before "normal" reports. 19991219-02 Fixed bug in code that prevented "--ignore_case" from actually doing anything. Thanks to Nadeem Hasan for reporting this and supplying the fix. 19991219-01beta Added the following caveat to the "Notes" section of Pflogsumm: ------------------------------------------------------------- IMPORTANT: Pflogsumm makes no attempt to catch/parse non- postfix/vmailer daemon log entries. (I.e.: Unless it has "postfix/" or "vmailer/" in the log entry, it will be ignored.) ------------------------------------------------------------- Added reporting of "panic" log messages. This was missed until now! Increased reporting detail of "fatal" and "warning" entries. (Actually, "warning" detail was increased in 19991120-01beta. Neglected to note it then.) 19991123-01 (unreleased) Added "--mailq" option. (Convenience factor.) Runs Postfix's "mailq" command at the end of the other reports. ------------------------------------------------------- NOTE: If Postfix's "mailq" command isn't in your $PATH, you'll have to edit the "$mailqCmd" variable located near the top of pflogsumm to path it explicitly. ------------------------------------------------------- 19991120-01 Tried once again to improve parsing of reject log entries. Specifically: those associated with "RCPT" rejects. 19991016-01 (not generally released) Added --smtpd_stats. Generates smtpd connection statistics. --------------------------------------------------------------- NOTE: Support for --smtpd_stats requires the Date::Calc module (available from CPAN). If you don't want to go to the trouble of fetching & installing that module, and you don't want smtpd stats anyway, *carefully* identify all of the code sections delimited by "# ---Begin: SMTPD_STATS_SUPPORT---" and "# ---End: SMTPD_STATS_SUPPORT---" and remove them. --------------------------------------------------------------- 19990909-01 (not generally released) Added -i and --ignore_case options. Causes entire email address to be lower-cased instead of just the host/domain part. Added "use locale". (This means that the sorting order within reports may be different from before--depending on how you have your machine's locale set.) 19990904-03 Improved "reason" parsing and reporting for bounced and deferred messages. Added parsing of "cleanup" reject lines to catch PCRE/regexp rejects. Added "reject" stats to per-hour and (on multi-day reports) per- day reports. Improved "warnings" report to show details. A single message deferred multiple times showed up as multiple deferrals--implying that multiple messages were deferred. Now shows "how many messages were deferred" and "how many deferrals" as separate stats. Changed display of "Grand Totals" to make it a bit more readable (IMO). Added "automatic perl finder" line for those systems that don't support the "#!" notation. By popular demand: added note to comments as to where pflogsumm home page could be found :-). 19990413-02 Fixed problem with last octet of IP address getting truncated in reports when IP address used in place of unknown hosts. Changed the way a few internal variables were handled to be compatible with Perl 5.003. Don't run it under Perl 5.003 with the "-w" perl switch, tho! It will issue lots of warnings. All tests I performed indicated that it produces the correct output, however. ------------------------------------------------------------ NOTE: While this version was tested to work with Perl 5.003, I recommend that you upgrade to 5.004 or later. I will not guarantee that I'll remember to do the full regression- testing that I usually do with 5.003 as well. ------------------------------------------------------------ 19990411-01 NOTICE: As of this version of pflogsumm.pl, the "-c" switch is GONE! (As per the previous notice.) Added "--help" option to emit short usage message and bail out. Added "--iso_date_time" switch to change displays of dates and times to ISO 8601 standard formats (CCYY-MM-DD and HH:MM), rather than "Month-name Day-number CCYY" and "HHMM" formats (the default). Added "--verbose_msg_detail" switch. This causes the full "reason" to be displayed for the message deferral, bounce and reject summaries. (Note: this can result in quite long lines in the report. Also note that there have been a couple of subtle changes in the "reason" parsing/reporting in the default mode (no "--verbose_msg_detail".) Added "--verp_mung" option. The problem this addresses is "VERP" generated (??? so far as I can tell!) addresses (?) of the form: "list-return-NN-someuser=some.dom@host.sender.dom" These result in mail from the same "user" and site to look like it originated from different users, when in fact it originates from the same "user." There are presently two "levels" of address munging available. With no numeric argument (or any value less than 2), the above address will be converted to: "list-return-ID-someuser=some.dom@host.sender.dom" In other words: the numeric value will be replaced with "ID". By specifying "--verp_mung=2", the munging is more "aggressive", converting the above address to something like: "list@host.sender.dom" Which looks more "normal." (Actually: specifying anything less than 2 does the "simple" munging and anything greater than 1 results in the more "aggressive" hack being applied.) Added "--uucp_mung" switch for consistence with "--verp_mung". 19990321-01 NOTICE: As of this version of pflogsumm.pl, versions of VMailer prior to 19981023 are no longer supported. Sorry. Pflogsumm-19990121-01.pl will be made permanently available from now on for those with out-of-date versions of VMailer prior to 19981023. NOTICE: As of this version of pflogsumm.pl, the "-c" switch is DEPRECATED. This version is transitional and retains it. The next version will not have it. Subsequent versions may re-use it for another purpose. Use the "-h" and "-u" switches instead. Added "-h" and "-u" switches to provide finer-grained control over report output. Deprecated "-c". Added "deferred" and "bounced" to "Grand Totals", "by-day" and "by- hour" reports. Added "by-host/domain" reports. For sent (delivered) and received messages: lists message count, total size of messages and host/domain. For delivered messages: also lists number of deferred messages and average and maximum delivery time. Both reports sorted by message count in descending order. Grand totals also now list number of recipient and sender hosts/domains. Re-wrote "by-user" data collection storage to reduce memory consumption by in-memory hashes. Moved "credits" from pflogsumm.pl to this file. 19990121-01 Now accounts for forwarded messages. Side-effects of the above: . Total messages size now broken-out into total bytes received and total bytes delivered. . Count of forwarded messages now reported. . Postfix-internally-generated messages (e.g.: Postmaster notifications of bounces) are no longer counted as "received". (They do, however, show up as "delivered".) . Forwarded addresses no longer show up as "recipients" (just as with aliases and mailing lists). Note that "delivered" will exceed "received" when messages are forwarded because of additional header lines. 19990116-01 Added processing for "reject" log entries. Expanded detail of "deferred" and "bounced" log entries to include "reason". 19990110-05 Added "messages received/delivered by hour" and "messages received/delivered by day" reports. See the "Notes" section in the documentation for details on how these behave. Broke-out total message count to "messages received" and "messages delivered". (For the above two enhancements: "postfix/pickup" and "postfix/smtpd" lines are now processed. They used to be discarded.) Renamed "summary" report to "Grand Totals". Added code to parse date & time stamps from log entries. This was needed, in part, for the "messages per-hour/day" reports. It would have been necessary for future enhancements in the way of date- & time-based processing anyway. Added "Notes" section to docs at top of code. 19990109-01 Improved display of large integer values. 19990107-01 Bugfix only. Data for "extended detail" listing was being built even if "-e" not specified. This resulted in unexpected excessive memory consumption when crunching large amounts of data. Added warning about memory consumption when "-e" option specified. 19990103-01 Further improvement to "accuracy" of by-domain-then-logname sort. (Presently used only by "extended detail" listing). For comparison purposes: mungs "machine(s).host.dom" into "host.dom.machine(s)" so sort is keyed on "base" domain name before machines within the domain. Does *not* attempt to reverse the order of the "machine(s)" - so within a particular "base" domain, may not come out in quite the right order. ("foo.bar.some.dom" will come out before "sales.acme.some.dom", for example.) Also works for 2x2-style domain names. (I.e.: "some.do.co") 19990102-01 (never released) Added "mung UUCP-style bang-paths" switch (-m). Improved performance and "accuracy" of by-domain-then-logname sort used by (only at present) "extended detail" listing. 19990101-02 Added "extended detail" option (-e). At present this includes only a per-message detail listing, which lists per-message detail sorted by sender domain, then sender username, then by queue i.d. Improved docs a bit. 19990101-01 Replaced warning message when message size unavailable in favor of producing a report of these, sorted by queue i.d. Unlike the other reports, this report header is not emitted at all if there are none of these. (Always acts as if the -q switch had been specified). 19981231.01 Added experimental code to lower-case all domain names so that "user@foo.dom" and "user@FOO.DOM" will come out the same. Added test for existence of message size value when "to=" records are being processed. This was necessary for cases in which the logfile entry containing the "status=sent" record is not processed at the same time as the logfile containing the "size=nnnn" record. Note that this will produce a summary that will show recipient counts without matching recipient sizes. The only way to cure this would be to create a separate disk file to "memorize" message sizes. (Which would introduce a whole new raft of problems.) Added warning message (emitted to stderr) when the situation above is detected. Fixed "usage" message to indicate you can specify files on command line Wrapped a couple of long lines in the comments and code. Added (temporary) version numbering scheme. Started this log. Other changes/enhancements since previous un-version-numbered versions: deals with log entries for VMailer as well as Postfix, more robust parsing of "to=" and "from=" fields (now handles spaces in these), eliminated double-counting of message sizes (happened when delivery was deferred), re-structured parsing to be more robust (not- to-mention correct!), added "grand summary" report at top (total messages, total size, number of senders and recipients). Credits [Note: The credits reflect suggestions and code contributions that have actually been added. If your contribution doesn't appear here, it may simply mean that it hasn't been added yet. (In which case it should be on the list above.) On the other hand: if I failed to credit you for something that *has* been added, please let me know!] Paul D. Robertson For much testing and patience and many good suggestions on how pflogsumm could be improved. Simon J Mudd For the following code contributions: Add "deferred" and "bounced" to "by hour" reports. (I also added these to "by day" reports and "Grand Totals".) "VERP" (?) address munger (less-agressive version) Suggestion for "by domain" delivery delay report. For the --smtpd_stats suggestion. Anders Arnholm For pointing out the problem with forwarded messages. Walcir Fontanini For pointers to changes to make for Perl 5.003 compatibility. (Added to 19990413-02beta.) (Which I will *try* to keep in mind!) Eric Cholet For the --ignore_case patch. Kurt Andersen For the ISO date formatting month-off-by-one patch and the connect time overflow fix. Thomas Parmelan For improved "rejects" reporting patch. Glen Eustace Patch to fix "reject: header" matching after Wietse changed the logfile format.