]> git.sven.stormbind.net Git - sven/pflogsumm.git/commitdiff
New upstream version 1.1.10 upstream/1.1.10
authorSven Hoexter <sven@stormbind.net>
Fri, 30 May 2025 06:37:28 +0000 (08:37 +0200)
committerSven Hoexter <sven@stormbind.net>
Fri, 30 May 2025 06:37:28 +0000 (08:37 +0200)
ChangeLog
pffrombyto.1
pflogsumm
pflogsumm.1
pftobyfrom.1

index d554b8617b3931b3c926a8bd7cf470c9016dc307..1cc76ce0f703b0701ca4618d58bb6ccd9872c271 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,16 @@ ChangeLog for pflogsumm
      http://jimsun.LinxNet.com/postfix_contrib.html.]
 
 
+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
index efb1f25a825029a4823238a4bf5fc8ac0c78dd55..eb0e61af0da714cc0c0b846f59007f5ff08174d5 100644 (file)
@@ -55,7 +55,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PFFROMBYTO 1"
-.TH PFFROMBYTO 1 2025-05-22 1.1.9 "User Contributed Perl Documentation"
+.TH PFFROMBYTO 1 2025-05-22 1.1.10 "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
index 561651b45f9acdd9f4b07e00f1c1ef94b50a8adb..53c8b6bfdfd9c4a8ff4ddbfb06a8837b0289353e 100755 (executable)
--- a/pflogsumm
+++ b/pflogsumm
@@ -6,7 +6,7 @@ eval 'exec perl -S $0 "$@"'
 
 pflogsumm - Produce Postfix MTA logfile summary
 
-Copyright (C) 1998-2025 by James S. Seymour, Release 1.1.9
+Copyright (C) 1998-2025 by James S. Seymour, Release 1.1.10
 
 =head1 SYNOPSIS
 
@@ -411,7 +411,7 @@ eval { require Date::Calc };
 my $hasDateCalc = $@ ? 0 : 1;
 
 my $mailqCmd = "mailq";
-my $release = "1.1.9";
+my $release = "1.1.10";
 
 # Variables and constants used throughout pflogsumm
 use vars qw(
@@ -742,6 +742,7 @@ while(<>) {
                proc_smtpd_reject($logRmdr, \%rejects, \$msgsRjctd,
                                  \$rejPerHr[$msgHr],
                                  \${$msgsPerDay{$revMsgDateStr}}[4]);
+               delete($rcvdMsg{$qid}) if($rcvdMsg{$qid});      # If it's rejected later in the game
            } elsif($rejSubTyp eq 'reject_warning') {
                proc_smtpd_reject($logRmdr, \%warns, \$msgsWrnd,
                                  \$rejPerHr[$msgHr],
@@ -959,6 +960,16 @@ while(<>) {
     }
 }
 
+# Experimental:
+#
+# If messages were "received" but undelivered, unforwarded, and not
+# rejected in cleanup, odds are nothing was ever really received—not
+# even a 0-length message.
+#
+if(my $noSizeCnt = scalar grep { !exists $rcvdMsg{$_}{'size'} } keys %rcvdMsg) {
+    $msgsRcvd -= $noSizeCnt;
+}
+
 # debugging
 if($unProcd) {
     close($unProcd) ||
@@ -1580,10 +1591,14 @@ sub gimme_domain {
     $_ = $_[0];
     my $bracketRegex  = '([^\s\[]+)\[((?:\d{1,3}\.){3}\d{1,3}|[\da-fA-F:]+(?:::(?:[\da-fA-F:]+)?)?|[\da-fA-F:]+:(?:\d{1,3}\.){3}\d{1,3})\]';
     my $slashSepRegex = '([^\s\/]+)\/((?:\d{1,3}\.){3}\d{1,3}|[\da-fA-F:]+(?:::(?:[\da-fA-F:]+)?)?|[\da-fA-F:]+:(?:\d{1,3}\.){3}\d{1,3})';
+    # Rejects and so-on from postscreen pass these in
+    my $addrOnlyRegex  = '^\[((?:\d{1,3}\.){3}\d{1,3}|[\da-fA-F:]+(?:::(?:[\da-fA-F:]+)?)?|[\da-fA-F:]+:(?:\d{1,3}\.){3}\d{1,3})\]';
     my ($fqdn, $ipaddr);
 
-    unless((($fqdn, $ipaddr) = /$bracketRegex/i) == 2) {
-       ($fqdn, $ipaddr) = /$slashSepRegex/i;
+    unless(((($fqdn, $ipaddr) = /$bracketRegex/i) == 2) ||
+       (($fqdn, $ipaddr) = /$slashSepRegex/i) == 2)
+    {
+       ($ipaddr) = /$addrOnlyRegex/i;
     }
     $fqdn = "unknown" unless($fqdn);
     $ipaddr = "unknown" unless($ipaddr);
@@ -1765,7 +1780,7 @@ sub proc_smtpd_reject {
        $rejData .= "  ($from)" if($opts{'rejAddFrom'});
        ++$rejects->{$rejTyp}{$rejReas}{$rejData};
     } else {
-#      print STDERR "dbg: unknown reject reason $rejReas !\n\n";
+       #print STDERR "dbg: unknown/un-enumerated reject reason $rejReas, \$rejFrom: \"$rejFrom\"!\n\n";
        my $rejData = gimme_domain($rejFrom);
        if($opts{'rejAddFrom'} && $opts{'rejAddTo'} && $to) {
            $rejData .= "  ($from -> $to)";
index 488ce95102028a3d8fbe39abb504f023bca4f94e..98a8bc80580a4f99caa562313f700ef1a38c1d9e 100644 (file)
@@ -55,7 +55,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PFLOGSUMM 1"
-.TH PFLOGSUMM 1 2025-05-27 1.1.9 "User Contributed Perl Documentation"
+.TH PFLOGSUMM 1 2025-05-29 1.1.10 "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -63,7 +63,7 @@
 .SH NAME
 pflogsumm \- Produce Postfix MTA logfile summary
 .PP
-Copyright (C) 1998\-2025 by James S. Seymour, Release 1.1.9
+Copyright (C) 1998\-2025 by James S. Seymour, Release 1.1.10
 .SH SYNOPSIS
 .IX Header "SYNOPSIS"
 .Vb 8
index 4d59013fe737b15bae4799bbda46d4e8963eae3b..a62a1234f9a35c122b1bbac1ec49e970ed82a4e0 100644 (file)
@@ -55,7 +55,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PFTOBYFROM 1"
-.TH PFTOBYFROM 1 2025-05-22 1.1.9 "User Contributed Perl Documentation"
+.TH PFTOBYFROM 1 2025-05-22 1.1.10 "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l