head 1.2; access; symbols pkgsrc-2026Q3:1.1.0.56 pkgsrc-2026Q3-base:1.1 pkgsrc-2026Q2:1.1.0.54 pkgsrc-2026Q2-base:1.1 pkgsrc-2026Q1:1.1.0.52 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.50 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.48 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.46 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.44 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.42 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.40 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.38 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.36 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.34 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.32 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.30 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.28 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.26 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.24 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.22 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.20 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.18 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.16 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.14 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.12 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.10 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.8 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.6 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.2 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.4 pkgsrc-2019Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2026.09.30.02.05.08; author brook; state dead; branches; next 1.1; commitid Txj2iyxJGG85uAXG; 1.1 date 2019.12.01.04.21.56; author kim; state Exp; branches; next ; commitid LcHq1tSM9v0KqXMB; desc @@ 1.2 log @sysutils/pflogsumm: update to v1.2.0 After a long hiatus, pflogsumm is now getting more active development. While here, improve Makefile handling of, for example, interpreter substitution, etc. Note the new location for upstream. ChangeLog for pflogsumm [since v1.1.5] 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. @ text @$NetBSD: patch-pflogsumm.pl,v 1.1 2019/12/01 04:21:56 kim Exp $ Fix IPv6 matching in the bracket case. --- pflogsumm.pl.orig 2012-02-05 22:25:25.000000000 +0000 +++ pflogsumm.pl @@@@ -1536,7 +1536,7 @@@@ # split domain/ipaddr into separates # newer versions of Postfix have them "dom.ain[i.p.add.ress]" # older versions of Postfix have them "dom.ain/i.p.add.ress" - unless((($domain, $ipAddr) = /^([^\[]+)\[((?:\d{1,3}\.){3}\d{1,3})\]/) == 2 || + unless((($domain, $ipAddr) = /^([^\[]+)\[([0-9a-f.:]+)\]/i) == 2 || (($domain, $ipAddr) = /^([^\/]+)\/([0-9a-f.:]+)/i) == 2) { # more exhaustive method ($domain, $ipAddr) = /^([^\[\(\/]+)[\[\(\/]([^\]\)]+)[\]\)]?:?\s*$/; @ 1.1 log @Fix matching of IPv6 addresses. Update to 1.1.5 as well. NOTE: option naming has changed (underscores to hyphens). @ text @d1 1 a1 1 $NetBSD$ @