Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package logwatch for openSUSE:Factory checked in at 2026-06-05 15:01:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logwatch (Old) and /work/SRC/openSUSE:Factory/.logwatch.new.2375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logwatch" Fri Jun 5 15:01:12 2026 rev:57 rq:1357178 version:7.14 Changes: -------- --- /work/SRC/openSUSE:Factory/logwatch/logwatch.changes 2026-02-04 21:10:48.388432975 +0100 +++ /work/SRC/openSUSE:Factory/.logwatch.new.2375/logwatch.changes 2026-06-05 15:01:49.812103340 +0200 @@ -1,0 +2,34 @@ +Tue Jun 2 12:18:14 UTC 2026 - Petr Gajdos <[email protected]> + +- Update to 7.14 + * Merge /u/opoplawski/logwatch/ branch archives into master + * Add missing flag for Output_Generated + * Merge /u/fcrawford/logwatch/ branch frank-zz-disk-space into master + * Sort human order + * [postfix] Support for Postfix version 3.11, by Michael Grimm + * [dnf5] Exit gracefully if dnf not installed. + * [clam-update] Clarified use of files in syslog format. + * Merge /u/fcrawford/logwatch/ branch frank-misc into master + * Match some updated output + * Fix output of blank sendmail section when not running + * Update termination message + * [dovecot] Added support for Submission statements, by Bob Hockney + * Suppress excess new line when no output generated + * Exclude virtual FS nsfs + * Remove tabs and clean up formatting + * Handle dnf5 returning times as UTC + * Add new script to process dnf5 reports + * [dovecot] Fixed typos, by Vladimir Lomov + * [dovecot] Support for dovecot version 2.4, by Vladimir Lomov. + * [clam-update] Created specific $clam_update_detail variable, and added debug statements showing how it is set. + * [dovecot] Fixed spacing, by Vladimir Lomov + * [chronyd] Initial submission of chronyd, by Miroslav Lichvar. + * [sshd] Corrected port number in debug statement. Reported by Andrew Myers. + * [clam-update] Corrected instructions for using RemoveHeaders, per Nicolas Croiset + * Update documentation to reflect that --archives is the default and allow disabling with --noarchives +- modified sources + * ChangeLog +- deleted patches + * 0001-Exclude-virtual-FS-nsfs.patch (upstreamed) + +------------------------------------------------------------------- Old: ---- 0001-Exclude-virtual-FS-nsfs.patch logwatch-7.13.tar.gz New: ---- logwatch-7.14.tar.gz ----------(Old B)---------- Old:- deleted patches * 0001-Exclude-virtual-FS-nsfs.patch (upstreamed) ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logwatch.spec ++++++ --- /var/tmp/diff_new_pack.94NfcO/_old 2026-06-05 15:01:50.764142790 +0200 +++ /var/tmp/diff_new_pack.94NfcO/_new 2026-06-05 15:01:50.768142956 +0200 @@ -17,7 +17,7 @@ Name: logwatch -Version: 7.13 +Version: 7.14 Release: 0 Summary: Tool to analyze and report on system logs License: MIT @@ -31,8 +31,6 @@ Patch2: logwatch-timestamp_in_var.patch Patch3: harden_logwatch.service.patch Patch4: harden_logwatch_dmeventd.service.patch -# PATCH-FIX-UPSTREAM 0001-Exclude-virtual-FS-nsfs.patch bsc#1255862 -Patch5: 0001-Exclude-virtual-FS-nsfs.patch BuildRequires: xz Requires: grep Requires: mailx @@ -69,7 +67,6 @@ sed -i -e 's,%{_datadir}/doc/logwatch-\*,%{_defaultdocdir}/logwatch,' logwatch.8 %patch -P 3 -p1 %patch -P 4 -p1 -%patch -P 5 -p1 %build ++++++ ChangeLog ++++++ --- /var/tmp/diff_new_pack.94NfcO/_old 2026-06-05 15:01:50.808144614 +0200 +++ /var/tmp/diff_new_pack.94NfcO/_new 2026-06-05 15:01:50.812144779 +0200 @@ -2,6 +2,34 @@ control logs (e.g. 'git log --oneline v1..v2'), as the Logwatch project does not release a change log themselves. *** +==== 7.14 ==== +93cb38b (tag: 7.14) Preparation for release 7.14 +787379b Merge /u/opoplawski/logwatch/ branch archives into master +17460ed Add missing flag for Output_Generated +b7dde79 Merge /u/fcrawford/logwatch/ branch frank-zz-disk-space into master +c98f920 Sort human order +606b93e [postfix] Support for Postfix version 3.11, by Michael Grimm +a2fef13 [dnf5] Exit gracefully if dnf not installed. +13e5ec2 [clam-update] Clarified use of files in syslog format. +dafde2c Merge /u/fcrawford/logwatch/ branch frank-misc into master +ae4c66e Match some updated output +95c52b1 Fix output of blank sendmail section when not running +aa38af9 Update termination message +fd1cb9c [dovecot] Added support for Submission statements, by Bob Hockney +bb9c4d2 Suppress excess new line when no output generated +6cbaacb Exclude virtual FS nsfs +eb2e9c2 Remove tabs and clean up formatting +26ff20a Handle dnf5 returning times as UTC +c59374f Add new script to process dnf5 reports +729132b [dovecot] Fixed typos, by Vladimir Lomov +5e6fa3d [dovecot] Support for dovecot version 2.4, by Vladimir Lomov. +d6bea66 [clam-update] Created specific $clam_update_detail variable, and added debug statements showing how it is set. +d59e5e4 [dovecot] Fixed spacing, by Vladimir Lomov +54e800c [chronyd] Initial submission of chronyd, by Miroslav Lichvar. +7d5a0ba [sshd] Corrected port number in debug statement. Reported by Andrew Myers. +eb5893b [clam-update] Corrected instructions for using RemoveHeaders, per Nicolas Croiset +c478db8 Update documentation to reflect that --archives is the default and allow disabling with --noarchives + ==== 7.13 ==== 88df91d (HEAD -> master, tag: 7.13, origin/master, origin/HEAD) [logwatch] Preparation for Release 7.13 0ac11a5 [rsyslogd] De-duplicate lines with time calculations ++++++ logwatch-7.13.tar.gz -> logwatch-7.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/conf/logfiles/clam-update.conf new/logwatch-7.14/conf/logfiles/clam-update.conf --- old/logwatch-7.13/conf/logfiles/clam-update.conf 2025-04-06 22:58:58.000000000 +0200 +++ new/logwatch-7.14/conf/logfiles/clam-update.conf 2025-12-24 02:41:00.000000000 +0100 @@ -59,11 +59,17 @@ Archive = archiv/clam-update-* Archive = archiv/freshclam.log-* -# Enable (remove '#' comment character) when using syslog logging, +# Enable (remove '#' comment character) when using syslog-format logging, # either with standard or high-precision timestamping. #*ApplyStdDate #*OnlyService = freshclam #*RemoveHeaders +## And for systems that syslog to file named 'syslog': +#LogFile = +#LogFIle = syslog +#LogFile = syslog.0 +#Archive = +#Archive = syslog.*.gz # vi: shiftwidth=3 tabstop=3 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/conf/services/chronyd.conf new/logwatch-7.14/conf/services/chronyd.conf --- old/logwatch-7.13/conf/services/chronyd.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/logwatch-7.14/conf/services/chronyd.conf 2025-10-19 10:55:44.000000000 +0200 @@ -0,0 +1,20 @@ +# You can put comments anywhere you want to. They are effective for the +# rest of the line. + +# this is in the format of <name> = <value>. Whitespace at the beginning +# and end of the lines is removed. Whitespace before and after the = sign +# is removed. Everything is case *insensitive*. + +# Yes = True = On = 1 +# No = False = Off = 0 + +Title = "chronyd" + +# Which logfile group... +LogFile = messages + +# Only give lines pertaining to the chronyd service... +*OnlyService = chronyd +*RemoveHeaders + +# vi: shiftwidth=3 tabstop=3 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/conf/services/clam-update.conf new/logwatch-7.14/conf/services/clam-update.conf --- old/logwatch-7.13/conf/services/clam-update.conf 2023-12-31 23:30:07.000000000 +0100 +++ new/logwatch-7.14/conf/services/clam-update.conf 2025-10-19 10:55:44.000000000 +0200 @@ -43,6 +43,9 @@ Title = "clam-update" +# Specify output detail level +#$Clam_Update_Detail = 0 + # Which logfile group... LogFile = clam-update diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/conf/services/dnf5.conf new/logwatch-7.14/conf/services/dnf5.conf --- old/logwatch-7.13/conf/services/dnf5.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/logwatch-7.14/conf/services/dnf5.conf 2025-10-19 12:42:42.000000000 +0200 @@ -0,0 +1,19 @@ +# You can put comments anywhere you want to. They are effective for the +# rest of the line. + +# this is in the format of <name> = <value>. Whitespace at the beginning +# and end of the lines is removed. Whitespace before and after the = sign +# is removed. Everything is case *insensitive*. + +# Yes = True = On = 1 +# No = False = Off = 0 + +Title = "dnf5" + +# Which logfile group... +LogFile = NONE + +# Currently DNF5 defaults to UTC for all times +$dnf5_uses_UTC = 1 + +# vi: shiftwidth=3 tabstop=3 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/logwatch.8 new/logwatch-7.14/logwatch.8 --- old/logwatch-7.13/logwatch.8 2025-04-06 23:06:23.000000000 +0200 +++ new/logwatch-7.14/logwatch.8 2026-01-22 04:00:45.000000000 +0100 @@ -13,7 +13,7 @@ .I service-name .B ] [--mailto .I address -.B ] [--archives] [--range +.B ] [--noarchives] [--range .I range .B ] [--debug .I level @@ -80,12 +80,13 @@ Additional options are listed when invoked with the .I Help parameter. -.IP "\fB--archives\fR" +.IP "\fB--noarchives\fR" Each log-file-group has basic logfiles (i.e. /var/log/messages) as well as archives (i.e. /var/log/messages.? or /var/log/messages.?.gz). -When used with "\-\-range all", this option will make Logwatch search -through the archives in addition to the regular logfiles. For other -values of \-\-range, Logwatch will search the appropriate archived logs. +By default, Logwatch will search through the archives in addition to the +regular logfiles. For values of \-\-range other than "all", Logwatch will +search the appropriate archived logs. If "\-\-noarchives" is specified, +Logwatch will not search the archived logs for any value of "\-\-range" .IP "\fB--debug\fR level" For debugging purposes. .I level @@ -151,7 +152,7 @@ information. .RE .SH EXAMPLES -.B logwatch --service ftpd-xferlog --range all --detail high --archives +.B logwatch --service ftpd-xferlog --range all --detail high .RS This will print out all FTP transfers that are stored in all current and archived xferlogs. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/logwatch.spec new/logwatch-7.14/logwatch.spec --- old/logwatch-7.13/logwatch.spec 2025-07-22 02:04:18.000000000 +0200 +++ new/logwatch-7.14/logwatch.spec 2026-01-22 04:05:19.000000000 +0100 @@ -1,6 +1,6 @@ Summary: Analyzes and Reports on system logs Name: logwatch -Version: 7.13 +Version: 7.14 Release: 1 License: MIT Group: Applications/System @@ -112,6 +112,9 @@ %changelog +* Thu Jan 22 2026 Frank Crawford <[email protected]> 7.14 +- release 7.14 + * Tue Jun 22 2025 Bjorn <[email protected]> 7.13 * Wed Jan 22 2025 Bjorn <[email protected]> 7.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/logwatch.pl new/logwatch-7.14/scripts/logwatch.pl --- old/logwatch-7.13/scripts/logwatch.pl 2025-07-22 01:56:15.000000000 +0200 +++ new/logwatch-7.14/scripts/logwatch.pl 2026-01-22 04:06:02.000000000 +0100 @@ -10,8 +10,8 @@ ######################################################## # Specify version and build-date: -my $Version = '7.13'; -my $VDate = '07/22/25'; +my $Version = '7.14'; +my $VDate = '01/22/26'; ####################################################### # Logwatch was originally written by: @@ -204,7 +204,7 @@ "s|service=s@" => \@TempServiceList, "m|mailto=s" => \$tmp_mailto, "filename=s" => \$tmp_savefile, - "a|archives" => \$Config{'archives'}, + "a|archives!" => \$Config{'archives'}, "debug=s" => \$Config{'debug'}, "r|range=s" => \$Config{'range'}, "n|numeric" => \$Config{'numeric'}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/chronyd new/logwatch-7.14/scripts/services/chronyd --- old/logwatch-7.13/scripts/services/chronyd 1970-01-01 01:00:00.000000000 +0100 +++ new/logwatch-7.14/scripts/services/chronyd 2025-10-19 10:55:44.000000000 +0200 @@ -0,0 +1,170 @@ +######################################################## +# Please file all bug reports, patches, and feature +# requests under: +# https://sourceforge.net/p/logwatch/_list/tickets +# Help requests and discusion can be filed under: +# https://sourceforge.net/p/logwatch/discussion/ +######################################################## + +####################################################### +## Copyright (c) 2025 Miroslav Lichvar +## Covered under the included MIT/X-Consortium License: +## http://www.opensource.org/licenses/mit-license.php +## All modifications and contributions by other persons to +## this script are assumed to have been donated to the +## Logwatch project and thus assume the above copyright +## and licensing terms. If you want to make contributions +## under your own copyright or a different license this +## must be explicitly stated in the contribution an the +## Logwatch project reserves the right to not accept such +## contributions. If you have made significant +## contributions to this script and want to claim +## copyright please contact [email protected]. +######################################################### + +use warnings; +use strict; +use Logwatch ':all'; + +my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0; +my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0; + +my ( +$Error, $Source, +); + +my $Exited = 0; +my %SelectedSources = (); +my %ReplacedSources = (); +my %Falsetickers = (); +my %FatalErrors = (); +my %Errors = (); +my %Warnings = (); +my %OtherList = (); + +while (defined(my $ThisLine = <STDIN>)) { + chomp($ThisLine); + + if ( + ($ThisLine =~ /^Accumulated delta/) or + ($ThisLine =~ /^Activated time smoothing/) or + ($ThisLine =~ /^(Added|Removed) (pool|source)/) or + ($ThisLine =~ /^(Allowed|Denied) (all )?(NTP|command) access/) or + ($ThisLine =~ /^(Enabled|Disabled) (control|local|HW timestamping)/) or + ($ThisLine =~ /^Dropping sample around leap second/) or + ($ThisLine =~ /^Frequency .* read from/) or + ($ThisLine =~ /^Initial frequency/) or + ($ThisLine =~ /^Loaded (.* symmetric keys|dump file|server NTS keys)/) or + ($ThisLine =~ /^Loaded seccomp filter/) or + ($ThisLine =~ /^Making a (frequency change|slew)/) or + ($ThisLine =~ /^New (makestep|maxupdateskew|reselect)/) or + ($ThisLine =~ /^RTC wrong/) or + ($ThisLine =~ /^Received shutdown command/) or + ($ThisLine =~ /^Reset all sources/) or + ($ThisLine =~ /^Source [^ ]+ ([^ ]+ )?changed (port )?to/) or + ($ThisLine =~ /^Source [^ ]+ (new |offline|online)/) or + ($ThisLine =~ /^Source [^ ]+ selection options modified/) or + ($ThisLine =~ /^System clock (TAI|off|status|wrong) /) or + ($ThisLine =~ /^System time (restored|set) /) or + ($ThisLine =~ /^System's initial offset /) or + ($ThisLine =~ /^Using (leap second list|[^ ]+ timezone)/) or + ($ThisLine =~ /^chronyd version [^ ]+ starting/) or + ($ThisLine =~ /^chronyd exiting/) or + ($ThisLine =~ /^Could not load dump file/) or + ($ThisLine =~ /^System clock was stepped/) or + 0 # This line prevents blame shifting as lines are added above + ) { + # Ignore these + } elsif ( ($Error) = ($ThisLine =~ /^Fatal error : (.*)/) ) { + $FatalErrors{$Error}++; + } elsif ( + ($ThisLine =~ /^Adjusting system clock for leap second/) or + ($ThisLine =~ /^Adjustment of /) or + ($ThisLine =~ /^Assumed NTP time /) or + ($ThisLine =~ /^(Backward|Forward) time jump/) or + ($ThisLine =~ /^Can't synchronise:/) or + ($ThisLine =~ /^Could not read RTC LOCAL\/UTC/) or + ($ThisLine =~ /^Having write access to/) or + ($ThisLine =~ /^Ignoring leap second/) or + ($ThisLine =~ /^Jitter of [^ ]+ exceeds/) or + ($ThisLine =~ /^Key [^ ]+ is (missing|too short)/) or + ($ThisLine =~ /^No ntsdumpdir to save/) or + ($ThisLine =~ /^RTC time before/) or + ($ThisLine =~ /^Received KoD RATE/) or + ($ThisLine =~ /^Root distance of [^ ]+ exceeds/) or + ($ThisLine =~ /^Running with root privileges/) or + ($ThisLine =~ /^System clock interference detected/) or + ($ThisLine =~ /^World-readable permissions/) or + 0 + ) { + $Warnings{$ThisLine}++; + } elsif ( + ($ThisLine =~ /^Could not /) or + ($ThisLine =~ /^Received invalid NTS-KE response/) or + ($ThisLine =~ /^TLS handshake with .* failed/) or + ($ThisLine =~ /^(TLS|NTS-KE) session with/) or + 0 + ) { + $Errors{$ThisLine}++; + } elsif ( ($Source) = ($ThisLine =~ /^Detected falseticker ([^ ]+)/) ) { + $Falsetickers{$Source}++; + } elsif ( ($Source) = ($ThisLine =~ /^Selected source ([^ ]+)/) ) { + $SelectedSources{$Source}++; + } elsif ( ($Source) = ($ThisLine =~ /^Source ([^ ]+) replaced with/) ) { + $ReplacedSources{$Source}++; + } else { + $OtherList{$ThisLine} += 1; + } +} + +########################################################### + +sub timesplural { + my ($count) = @_; + my $plural = ($count > 1) ? "s" : ""; + return "$count Time$plural\n"; +} + +if ($Detail >= 5 and keys %SelectedSources) { + print "\nSelected sources:\n"; + print " $_: " . timesplural($SelectedSources{$_}) foreach sort keys %SelectedSources; +} + +if ($Detail >= 5 and keys %ReplacedSources) { + print "\nReplaced sources:\n"; + print " $_: " . timesplural($ReplacedSources{$_}) foreach sort keys %ReplacedSources; +} + +if ($Detail >= 5 and keys %Falsetickers) { + print "\nDetected falsetickers:\n"; + print " $_: " . timesplural($Falsetickers{$_}) foreach sort keys %Falsetickers; +} + +if (keys %FatalErrors) { + print "\nFatal Errors:\n"; + print " $_: " . timesplural($FatalErrors{$_}) foreach sort keys %FatalErrors; +} + +if (keys %Errors) { + print "\nErrors:\n"; + print " $_: " . timesplural($Errors{$_}) foreach sort keys %Errors; +} + +if (keys %Warnings) { + print "\nWarnings:\n"; + print " $_: " . timesplural($Warnings{$_}) foreach sort keys %Warnings; +} + +if (keys %OtherList) { + print "\n**Unmatched Entries**\n"; + print " $_: " . timesplural($OtherList{$_}) foreach sort keys %OtherList; +} + +exit(0); + +# vi: shiftwidth=3 tabstop=3 syntax=perl et +# Local Variables: +# mode: perl +# perl-indent-level: 3 +# indent-tabs-mode: nil +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/clam-update new/logwatch-7.14/scripts/services/clam-update --- old/logwatch-7.13/scripts/services/clam-update 2025-02-05 04:43:37.000000000 +0100 +++ new/logwatch-7.14/scripts/services/clam-update 2025-10-19 10:55:44.000000000 +0200 @@ -59,7 +59,26 @@ use warnings; use Logwatch ':dates'; -my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'}; +my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0; + +my $Detail; +if (defined $ENV{'clam_update_detail'}) { + $Detail = $ENV{'clam_update_detail'}; + if ($Debug) { + print ("Detail set to $Detail from conf/services/clam-update.conf\n"); + } +} elsif (defined $ENV{'LOGWATCH_DETAIL_LEVEL'}) { + $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'}; + if ($Debug) { + print ("Detail set to $Detail from conf/logwatch.conf\n"); + } +} else { + $Detail = 0; + if ($Debug) { + print ("Detail set to $Detail from conf/logwatch.conf\n"); + } +} + my $Ignore_Outdated = $ENV{'ignore_outdated'} || 0; my $Ignore_No_Updates = $ENV{'ignore_no_updates'} || 0; my $Last_Run_Only = $ENV{'last_run_only'} || 0; @@ -167,7 +186,7 @@ print "-> If you are logging using syslog, you need to indicate that your\n"; print " log file uses the syslog format. For example:\n"; print " echo \"*OnlyService = freshclam\" >> /etc/logwatch/conf/logfiles/clam-update.conf\n"; - print " echo \"*RemoveHeaders\" >> /etc/logwatch/conf/logfiles/clam-update.conf\n"; + print " echo \"*RemoveHeaders = \" >> /etc/logwatch/conf/logfiles/clam-update.conf\n"; } if ($Status and (($Detail > 0) or (keys %Errors) or (keys %Warnings))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/clamav-milter new/logwatch-7.14/scripts/services/clamav-milter --- old/logwatch-7.13/scripts/services/clamav-milter 2022-08-08 05:25:17.000000000 +0200 +++ new/logwatch-7.14/scripts/services/clamav-milter 2025-12-24 02:41:00.000000000 +0100 @@ -73,7 +73,7 @@ $VirusList{$1}++; } elsif (my ($ChildLimit) = ($ThisLine =~ /hit max-children limit \((\d+ >= \d+)\): waiting for some to exit/)) { $MaxChildrenLimit{$ChildLimit}++; - } elsif (($ThisLine =~ /^Stopping/)) { + } elsif (($ThisLine =~ /^Stopping|ClamAV=terminating/)) { $DaemonStop++; } elsif (($ThisLine =~ /^(Starting|\+\+\+ Started)/)) { $DaemonStart++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/dnf5 new/logwatch-7.14/scripts/services/dnf5 --- old/logwatch-7.13/scripts/services/dnf5 1970-01-01 01:00:00.000000000 +0100 +++ new/logwatch-7.14/scripts/services/dnf5 2025-12-24 02:41:00.000000000 +0100 @@ -0,0 +1,209 @@ +######################################################## +# Please file all bug reports, patches, and feature +# requests under: +# https://sourceforge.net/p/logwatch/_list/tickets +# Help requests and discusion can be filed under: +# https://sourceforge.net/p/logwatch/discussion/ +######################################################## + +####################################################### +## Copyright (c) 2025 Frank Crawford <[email protected]> +## Covered under the included MIT/X-Consortium License: +## http://www.opensource.org/licenses/mit-license.php +## All modifications and contributions by other persons to +## this script are assumed to have been donated to the +## Logwatch project and thus assume the above copyright +## and licensing terms. If you want to make contributions +## under your own copyright or a different license this +## must be explicitly stated in the contribution an the +## Logwatch project reserves the right to not accept such +## contributions. If you have made significant +## contributions to this script and want to claim +## copyright please contact [email protected]. +######################################################### + +######################################################### +## Based on a script by Matthew McGillis +######################################################### + +use lib "/usr/share/logwatch/lib"; +use strict; +use POSIX; +use Logwatch ':dates'; +eval "use Date::Manip"; my $hasDM = $@ ? 0 : 1; + +my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0; +my $DebugCounter = 0; + +my $SearchDate = TimeFilter($ARGV[0] || '%Y-%m-%d %H:%M:%S'); + +my $pathto_dnf5 = $ENV{'pathto_dnf5'} || '/usr/bin/dnf'; +my $dnf5_uses_UTC = $ENV{'dnf5_uses_utc'} || 0; + +if ( $Debug >= 5 ) { + print STDERR "\nDEBUG: Inside dnf5 Filter \n"; + print STDERR "DEBUG: Path to dnf: $pathto_dnf5\n"; + print STDERR "DEBUG: Looking For: " . $SearchDate . "\n"; + print STDERR "DEBUG: dnf5_uses_UTC: " . $dnf5_uses_UTC . "\n"; + $DebugCounter = 1; +} + +open(VERSION, '-|', $pathto_dnf5, '--version') || exit(0); +my $version = <VERSION>; +if ( $version !~ "dnf5" ) { + if ( $Debug >= 5 ) { + print STDERR "DEBUG: Version does not match dnf5: $version\n"; + } + exit(1); +} + +if ( !$hasDM and $dnf5_uses_UTC and $Debug ) { + print STDERR "DEBUG: Date::Manip not found so cannot convert from UTC to localtime\n"; +} + +#Init Hashes +my ( + %PackageInstall, + %PackageUpgrade, + %PackageDowngrade, + %PackageReinstall, + %PackageRemove, + %PackageReplaced +); + +my @InfoMessages = (); + +open(LISTLINE, '-|', $pathto_dnf5, 'history', 'list', '--reverse') || die "can't run $pathto_dnf5: $!"; +while ( my $ListLine = <LISTLINE> ) { + my ($ID, $Cmd, $Date, $Count) = ($ListLine =~ /([ \d]+) +(.*) +([\d]{4}-[\d]{2}-[\d]{2} [\d]{2}:[\d]{2}:[\d]{2}) +(\d+)/); + if ( $Debug >= 20 ) { + print STDERR "DEBUG($DebugCounter): $ListLine"; + $DebugCounter++; + } + + if ( $dnf5_uses_UTC and defined($Date) ) { + my $new_date = ParseDate($Date); + $new_date = Date_ConvTZ($new_date, "UTC") if $new_date; + + if ( ! $new_date ) { + print STDERR "DEBUG($DebugCounter): Error converting date from UTC to localtime: $Date\n" if $Debug; + } else { + $Date = UnixDate( $new_date, $ARGV[0] || '%Y-%m-%d %H:%M:%S' ); + print STDERR "DEBUG($DebugCounter): Local Date: $Date\n" if $Debug >= 20; + } + } + + if ( $Date =~ /^$SearchDate/o ) { + open (INFOLINE, '-|', $pathto_dnf5, 'history', 'info', "$ID") || die "can't run $pathto_dnf5: $!"; + while ( my $InfoLine = <INFOLINE> ) { + if ( $Debug >= 10 and $InfoLine =~ /^[^\s]/ ) { + print STDERR "DEBUG($DebugCounter): $InfoLine"; + $DebugCounter++; + } + + if ( $InfoLine =~ /(Groups|Environments) altered:/ ) { + push(@InfoMessages, $InfoLine); + } + + next if ( $InfoLine =~ /^\s*$/ or $InfoLine =~ /^[^\s]/ ); + my ($Action, $Package, $Reason, $Repository) = ($InfoLine =~ / *([^\s]+) +([^\s]+) +(.+) +([^\s]+)$/); + if ( $Debug >= 5 ) { + print STDERR "DEBUG($DebugCounter): $InfoLine"; + print STDERR "DEBUG($DebugCounter): Action = $Action, Package = $Package\n"; + $DebugCounter++; + } + + if ( $Action !~ "Action" ) { + my ($Name, $EVRA, $Arch) = ($Package =~ /([^\s]+)-(\d+:[^\s-]+-[^\s]+\.([^\s.]+))/); + if ( $Debug >= 5 ) { + my $DC = $DebugCounter - 1; + print STDERR "DEBUG($DC): Name = $Name, EVRA = $EVRA, Arch = $Arch\n"; + } + + if ( !defined($Name) ) { + push(@InfoMessages, $InfoLine); + } elsif ( $Action =~ "Install" ) { + $PackageInstall{$Name . ":" . $Arch} = $EVRA; + } elsif ( $Action =~ "Upgrade" ) { + $PackageUpgrade{$Name . ":" . $Arch} = $EVRA; + } elsif ( $Action =~ "Downgrade" ) { + $PackageDowngrade{$Name . ":" . $Arch} = $EVRA; + } elsif ( $Action =~ "Reinstall" ) { + $PackageReinstall{$Name . ":" . $Arch} = $EVRA; + } elsif ( $Action =~ "Remove" ) { + $PackageRemove{$Name . ":" . $Arch} = $EVRA; + } elsif ( $Action =~ "Replaced" ) { + $PackageReplaced{$Name . ":" . $Arch} = $EVRA; + } else { + push(@InfoMessages, $InfoLine); + } + } + } + } +} + +if (keys %PackageInstall) { + print "\nPackages Installed:\n"; + foreach my $ThisOne (sort {lc($a) cmp lc($b)} keys %PackageInstall) { + my ($Name, $Arch) = ($ThisOne =~ /([^\s]+):([^\s]+)/ ); + print " " . $Name . ": " . $PackageInstall{$ThisOne} . "\n"; + } +} +if (keys %PackageReinstall) { + print "\nPackages Reinstalled:\n"; + foreach my $ThisOne (sort {lc($a) cmp lc($b)} keys %PackageReinstall) { + my ($Name, $Arch) = ($ThisOne =~ /([^\s]+):([^\s]+)/ ); + print " " . $Name . ": " . $PackageReinstall{$ThisOne} . "\n"; + } +} +if (keys %PackageUpgrade) { + print "\nPackages Updated:\n"; + foreach my $ThisOne (sort {lc($a) cmp lc($b)} keys %PackageReplaced) { + if ( defined($PackageUpgrade{$ThisOne}) ) { + my ($Name, $Arch) = ($ThisOne =~ /([^\s]+):([^\s]+)/ ); + print " " . $Name . ": " . $PackageReplaced{$ThisOne} . " -> " . $PackageUpgrade{$ThisOne} . "\n"; + } elsif ( !defined($PackageDowngrade{$ThisOne}) ) { + if ( $Debug >= 5 ) { + print STDERR "\nDEBUG($DebugCounter): Action = Updated->Removed, Package = $ThisOne\n"; + $DebugCounter++; + } + $PackageRemove{$ThisOne} = $PackageReplaced{$ThisOne}; + } + } +} +if (keys %PackageDowngrade) { + print "\nPackages Downgraded:\n"; + foreach my $ThisOne (sort {lc($a) cmp lc($b)} keys %PackageReplaced) { + if ( defined($PackageDowngrade{$ThisOne}) ) { + my ($Name, $Arch) = ($ThisOne =~ /([^\s]+):([^\s]+)/ ); + print " " . $Name . ": " . $PackageReplaced{$ThisOne} . " -> " . $PackageDowngrade{$ThisOne} . "\n"; + } elsif ( !defined($PackageUpgrade{$ThisOne}) ) { + if ( $Debug >= 5 ) { + print STDERR "\nDEBUG($DebugCounter): Action = Downgraded->Removed, Package = $ThisOne\n"; + $DebugCounter++; + } + $PackageRemove{$ThisOne} = $PackageReplaced{$ThisOne}; + } + } +} +if (keys %PackageRemove) { + print "\nPackages Erased:\n"; + foreach my $ThisOne (sort {lc($a) cmp lc($b)} keys %PackageRemove) { + my ($Name, $Arch) = ($ThisOne =~ /([^\s]+):([^\s]+)/ ); + print " " . $Name . ": " . $PackageRemove{$ThisOne} . "\n"; + } +} + +if (@InfoMessages) { + print "\nInformation Messages:\n"; + foreach my $ThisOne (@InfoMessages) { + print " " . $ThisOne; + } +} + +exit(0); + +# vi: shiftwidth=3 tabstop=3 syntax=perl et +# Local Variables: +# mode: perl +# perl-indent-level: 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/dovecot new/logwatch-7.14/scripts/services/dovecot --- old/logwatch-7.13/scripts/services/dovecot 2025-02-21 22:42:52.000000000 +0100 +++ new/logwatch-7.14/scripts/services/dovecot 2025-12-24 02:48:21.000000000 +0100 @@ -82,6 +82,8 @@ $ENV{'dovecot_proxy_logins'} : $Detail; my $DetailSieveLogin = defined $ENV{'dovecot_sieve_logins'} ? $ENV{'dovecot_sieve_logins'} : $Detail; +my $DetailSubmissionsRelayed = defined $ENV{'dovecot_submissions_relayed'} ? + $ENV{'dovecot_submissions_relayed'} : $Detail; my $DetailSuccessfulLogins = defined $ENV{'dovecot_successful_logins'} ? $ENV{'dovecot_successful_logins'} : $Detail; my $DetailTLSInit = defined $ENV{'dovecot_tls_init'} ? @@ -96,6 +98,7 @@ my $Restarts = 0; my $End = 0; my $TLSInitFail = 0; +my $Output_Generated = 0; my %Aborted; my %AuthDisconnectedWithPending; my %AuthTimedOut; @@ -108,6 +111,7 @@ my %ConnectionIMAP; my %ConnectionPOP3; my %ConnectionSieve; +my %ConnectionSubmission; my %Disconnected; my %DiskQuotaExceed; my %Deliver; @@ -119,6 +123,7 @@ my %Login; my %LoginIMAP; my %LoginPOP3; +my %LoginSubmission; my %MailboxCreated; my %MailboxDeleted; my %MailboxRenamed; @@ -132,6 +137,7 @@ my %ProxyLogin; my %ProxyLoginIMAP; my %ProxyLoginPOP3; +my %Senders; my %SieveLogin; my %UnknownUsers; my %VacationDup; @@ -232,6 +238,7 @@ # IMAP login } elsif ( ( ($User, $Host, $Session) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: (?:Info: )?Login: user=\<(.*?)\>.*rip=(.*), lip=.*, session=<([^>]+)>/ ) ) or + ( ($User, $Host, $Session) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: Logged in: user=\<(.*?)\>.*rip=(.*), lip=.*, session=<([^>]+)>/ ) ) or # Session element was added in dovecot 2.1.6, so not available before # then. ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: Login: user=\<(.*?)\>.*rip=(.*), lip=.*/ ) ) or @@ -243,7 +250,7 @@ $LoginIMAP{$User}++; $ConnectionIMAP{$Host}++; $Connection{$Host}++; - if (defined($Session) and defined($MUASessionList{$Session})) { + if (defined($Session) and defined($MUASessionList{$Session})) { $MUAList{$MUASessionList{$Session}}{$User}++; delete $MUASessionList{$Session}; } @@ -267,7 +274,7 @@ # dovecot[123]: auth: passwd-file(user,1.2.3.4): unknown user # dovecot[123]: auth: passwd-file(user,1.2.3.4,<xxxx>): unknown user # - # dovecot[123]: auth: passwd-file(user,1.2.3.4): Password mismatch + # dovecot[123]: auth: passwd-file(user,1.2.3.4): Password mismatch # dovecot[123]: auth: passwd-file(user,1.2.3.4,<xxxx>): Password mismatch # # imap-login: @@ -277,9 +284,12 @@ # dovecot[123]: imap-login: Disconnected: Aborted login by logging out (auth failed, 1 attempts in 2 secs): user=<info>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.9, TLS, session=<xxxx> # } elsif (($User,$IP) = ( $ThisLine =~ /auth: (?:pam|passwd-file)\(([^,]+),([^,\)]+).*\): unknown user/ ) ) { - $UnknownUsers{$User}{$IP}++; + $UnknownUsers{$User}{$IP}++; } elsif (($User,$IP) = ( $ThisLine =~ /auth: (?:pam|passwd-file)\(([^,]+),([^,\)]+).*\): Password mismatch/ ) ) { $AuthFail{$User}{$IP}++; + } elsif ( ($Host) = ($ThisLine =~ /Login aborted:.*no_auth_attempts.*rip=([^,]+).*/) ) { + $Host = hostName($Host); + $Aborted{$Host}++; } elsif ( ($User, $IP) = ($ThisLine =~ /Disconnected: .* \(auth failed, .*\): user=<([^>]+)>,.*rip=([^,]+).*/) ) { $AuthFail{$User}{$IP}++; if ( ($Host) = ($ThisLine =~ /Aborted login.* rip=([0-9\.]+|[a-fA-F:0-9]+)/) ) { @@ -287,6 +297,12 @@ $Aborted{$Host}++; } +# submission +# submission(zeus)<307183><Rhh94lMzwfXAqCoC>: Successfully relayed message: from=<[email protected]>, size=1413, id=VaW1GXPwBmjvrwQAot0D+g, nrcpt=1, reply=`250 2.0.0 53M1RFgl307185 Message accepted for delivery': 1 Time(s) +# submission([email protected])<2636401><aXzTgPQzMNrAqCoC>: Successfully relayed message: from=<[email protected]>, size=1006, id=tF8oGTB3EWhxOigAot0D+g, nrcpt=1, reply=`250 2.0.0 53U14mWn2636403 Message accepted for delivery': 1 Time(s + } elsif (($User) = ( $ThisLine =~ /^$dovecottag submission\([[email protected]]*\)(?:<[^>]+><[^>]+>)?: Successfully relayed message: from=<([^>]*)>.*/ )) { + $Senders{$User}++; + # 'lda' for dovecot 2.0, 'deliver' for earlier versions } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\)(?:<[^>]+><[^>]+>)?: msgid=.*: saved mail to (.*)/ ) ) { $Deliver{$User}{$Mailbox}++; @@ -422,6 +438,10 @@ } elsif ( ($Reason, $Host) = ($ThisLine =~ /TLS initialization failed/) ) { $TLSInitFail++; +# TLS handshake not finished + } elsif ( ($Reason, $Host) = ($ThisLine =~ /(.*)tls_handshake_not_finished.*rip=([^,]+).*/) ) { + $TLSInitFail++; + # Aborted login } elsif ( ($Host) = ($ThisLine =~ /Aborted login:.* rip=(.*),/) ) { $Host = hostName($Host); @@ -470,20 +490,20 @@ $Disconnected{"in APPEND"}++; } elsif (($ThisLine =~ /Disconnected$/) or ($ThisLine =~ /(IMAP|POP3)\(.+\): Disconnected (bytes|top|rip|user|method)=/) or - ($ThisLine =~ /(imap\-login|pop3\-login): Disconnected: (bytes|top|rip|user|method)=/) ) { + ($ThisLine =~ /(imap\-login|pop3\-login|submission\-login): Disconnected: (bytes|top|rip|user|method)=/) ) { $Disconnected{"No reason"}++; } elsif ( ( ($Reason) = ($ThisLine =~ /(?:IMAP|POP3).+: Disconnected: (.+) (bytes|top)=/i)) or - ( ($Reason) = ($ThisLine =~ /(?:imap\-login|pop3\-login): Disconnected: \(?(.+)\)?: /)) or + ( ($Reason) = ($ThisLine =~ /(?:imap\-login|pop3\-login|submission\-login): Disconnected: \(?(.+)\)?: /)) or #This one should go away also -mgt ( ($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/i)) ) { $Disconnected{$Reason}++; - } elsif ($ThisLine =~ /(IMAP|POP3).+: Connection closed (top|bytes)=/i) { + } elsif ($ThisLine =~ /(IMAP|POP3|Submission).+: Connection closed (top|bytes)=/i) { $ConnectionClosed{"No reason"}++; } elsif ( ($Reason) = ($ThisLine =~ /(?:IMAP|POP3).+: Connection closed: (.*) (?:bytes|method|top|rip|user)=/i) ) { $ConnectionClosed{$Reason}++; } elsif ($ThisLine =~ /(IMAP|POP3).+: (Connection closed.*)/) { $Disconnected{$2}++; - } elsif ( ($Host) = ($ThisLine =~ /(?:imap\-login|pop3\-login): Aborted login: .*rip=(?:::ffff:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) ) { + } elsif ( ($Host) = ($ThisLine =~ /(?:imap\-login|pop3\-login|submission\-login): Aborted login: .*rip=(?:::ffff:)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) ) { $Aborted{$Host}++; } elsif ( ($Error) = ($ThisLine =~ /child \d* (?:\(login\) )?returned error (.*)/)) { # dovecot: child 23747 (login) returned error 89 @@ -505,6 +525,17 @@ $Fatal{$Fatal}++; } elsif ( ($Error) = ($ThisLine =~ /^(?:$dovecottag )?(.* Error:.*)/)) { $Error{$Error}++; +# Submission login + } elsif ( (($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?submission-login: Login: (.*?) \[(.*)\]/ ) ) or + (($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?submission-login: Login: user=\<(.*?)\>.*rip=(.*), lip=.*/ ) ) or + (($User, $Host, $Session) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: (?:Info: )?Login: user=\<(.*?)\>.*rip=(.*), lip=.*, session=<([^>]+)>/ ) ) ) { + if ($Host !~ /$IgnoreHost/) { + $Host = hostName($Host); + $Login{$User}{$Host}++; + $LoginSubmission{$User}++; + $ConnectionSubmission{$Host}++; + $Connection{$Host}++; + } } else { # Report any unmatched entries... chomp($ThisLine); @@ -512,7 +543,6 @@ } } - #----- important reports (shown at detail = 0) ---------------------------------------------- # # this is only set in dovecot 1.x section. @@ -521,6 +551,7 @@ foreach my $Fatal ( sort keys %Fatal ) { print " ${Fatal}: $Fatal{$Fatal} Time(s)\n"; } + $Output_Generated++; } # this is only set in dovecot 1.x section. @@ -529,6 +560,7 @@ foreach my $Error ( sort keys %Error ) { print " ${Error}: $Error{$Error} Time(s)\n"; } + $Output_Generated++; } # this is only set in dovecot 1.x section. @@ -537,6 +569,7 @@ foreach my $Error ( sort keys %ChildErr ) { print " error number ". $Error . ": ". $ChildErr{$Error} ." Time(s)\n"; } + $Output_Generated++; } # this is only set in dovecot 1.x section. @@ -545,14 +578,17 @@ foreach my $Name ( sort keys %DiskQuotaExceed ) { print " disk quota for user '". $Name . "' exceeded: ". $DiskQuotaExceed{$Name} ." Time(s)\n"; } + $Output_Generated++; } if ( $End ) { print "\nDovecot was killed, and not restarted afterwards.\n"; + $Output_Generated++; } if ( $Restarts ) { print "\nDovecot restarted $Restarts time(s).\n"; + $Output_Generated++; } if (keys %ConnectionClosed) { @@ -560,6 +596,7 @@ foreach my $Reason (sort keys %ConnectionClosed) { print " $Reason: $ConnectionClosed{$Reason} Time(s)\n"; } + $Output_Generated++; } if (keys %ProxyDisconnected) { @@ -567,6 +604,7 @@ foreach my $Reason (sort keys %ProxyDisconnected) { print " $Reason: $ProxyDisconnected{$Reason} Time(s)\n"; } + $Output_Generated++; } if ( keys %LimitExceeded ) { @@ -574,42 +612,67 @@ foreach my $Reason ( sort keys %LimitExceeded ) { print " $Reason: $LimitExceeded{$Reason} Time(s)\n"; } + $Output_Generated++; } #----- all about connections and failures (shown at detail > 0) ----------------------------- # if ( ( $DetailConnections >= 5 ) and ( keys %Connection ) ) { - print "\nDovecot IMAP and POP3 connections:". - "\n==================================". - "\nPOP3 IMAP Total Host". - "\n" . "-" x 72; + print "\n[Dovecot IMAP, POP3 and Submission] Connections:". + "\n================================================". + "\nPOP3 IMAP Submission Total Host". + "\n" . "-" x 83; $TLSInitFail = 0; my $IMAPCount = 0; my $POP3Count = 0; + my $SubmissionCount = 0; my $TotalCount = 0; foreach my $Host ( sort { $Connection{$b} <=> $Connection{$a} } keys %Connection ) { my $Total = $Connection{$Host}; my $Conns = 0; my $IMAP = 0; + my $Submission = 0; if ( defined ( $ConnectionPOP3{$Host} ) ) { $Conns = $ConnectionPOP3{$Host}; } if ( defined ( $ConnectionIMAP{$Host} ) ) { $IMAP = $ConnectionIMAP{$Host}; } + if (defined ($ConnectionSubmission{$Host})) { + $Submission = $ConnectionSubmission{$Host}; + } # Cleanly display IPv4 addresses $Host=~ s/::ffff://; - printf "\n%4s %4s %5s %s", $Conns, $IMAP, $Total, $Host; + printf "\n%4s %4s %10s %5s %s", $Conns, $IMAP, $Submission, $Total, $Host; $POP3Count += $Conns; $IMAPCount += $IMAP; + $SubmissionCount += $Submission; $TotalCount += $Total; } - print "\n" . "-" x 72; - printf "\n%4s %4s %5s %s", $POP3Count, $IMAPCount, $TotalCount, "Total"; + print "\n" . "-" x 83; + printf "\n%4s %4s %10s %5s %s", $POP3Count, $IMAPCount, $SubmissionCount, $TotalCount, "Total"; + $Output_Generated++; +} + +if ( ( $DetailSubmissionsRelayed >= 5) && (keys %Senders) ) { + my $Submissions = 0; + my %SubmissionsCount; + foreach my $Sender (keys %Senders) { + $SubmissionsCount{$Sender} += $Senders{$Sender}; + $Submissions += $SubmissionsCount{$Sender}; + } + printf "\n"; + printf "\nDovecot Submissions Relayed: %s", $Submissions; + foreach my $Sender (sort { $SubmissionsCount{$b} <=> $SubmissionsCount{$a} } + keys %SubmissionsCount) { + printf("\n %4s %s", $SubmissionsCount{$Sender}, $Sender); + } + $Output_Generated++; } + if ( ( $DetailDisconnects >= 5) and ( keys %Disconnected ) ) { my $Disconnects = 0; foreach my $Reason ( %Disconnected ) { @@ -621,6 +684,7 @@ keys %Disconnected ) { printf "\n %4s %s", $Disconnected{$Reason}, $Reason; } + $Output_Generated++; } #----- all about logins and failures (shown at detail > 0) ---------------------------------- @@ -635,8 +699,9 @@ $LoginCount += $LoginUserCount{$User}; $LoginPOP3{$User} = 0 if ( not defined $LoginPOP3{$User} ); $LoginIMAP{$User} = 0 if ( not defined $LoginIMAP{$User} ); + $LoginSubmission{$User} = 0 if (not defined $LoginSubmission{$User}); } - printf "\n\nDovecot IMAP and POP3 successful logins: %s", $LoginCount; + printf "\n\nDovecot IMAP, POP3 and Submission Successful Logins: %s", $LoginCount; foreach my $User ( sort { $LoginUserCount{$b} <=> $LoginUserCount{$a} } keys %LoginUserCount ) { printf("\n %4s %s", $LoginUserCount{$User}, $User); @@ -645,7 +710,9 @@ if ( $LoginPOP3{$User} > 0 ) { print "$LoginPOP3{$User} POP3"; }; if ( $LoginPOP3{$User} > 0 && $LoginIMAP{$User} > 0 ) { print ", "; }; if ( $LoginIMAP{$User} > 0 ) { print "$LoginIMAP{$User} IMAP"; }; - print ")"; + if (($LoginPOP3{$User} > 0 || $LoginIMAP{$User} > 0) && $LoginSubmission{$User} > 0) { print ", "; }; + if ($LoginSubmission{$User} > 0) { print "$LoginSubmission{$User} Submission"; }; + print ")"; foreach my $Host ( sort { $Login{$User}{$b} <=> $Login{$User}{$a} } keys %{$Login{$User}} ) { # Cleanly display IPv4 addresses @@ -654,6 +721,7 @@ } } } + $Output_Generated++; } # This has to be explicitly enabled in dovecot config to log this, @@ -671,6 +739,7 @@ print ") $Total Time(s)"; } } + $Output_Generated++; } if ( ( $DetailProxyLogin >= 5 ) and ( keys %ProxyLogin ) ) { @@ -707,6 +776,7 @@ } } print "\nTotal: $LoginCount successful logins"; + $Output_Generated++; } if ( ( $DetailSieveLogin >= 5 ) and ( keys %SieveLogin ) ) { @@ -730,6 +800,7 @@ } } print "\n\nTotal: $LoginCount successful ManageSieve logins"; + $Output_Generated++; } if ( ( $DetailAuthFail >= 5 ) and ( keys %AuthFail ) ) { @@ -752,6 +823,7 @@ } } } + $Output_Generated++; } if ( ( $DetailUnknownUser >= 5 ) and ( keys %UnknownUsers ) ) { @@ -774,6 +846,7 @@ } } } + $Output_Generated++; } # aborted logins @@ -782,6 +855,7 @@ foreach my $Host ( sort keys %Aborted ) { print "\n $Host: $Aborted{$Host} Time(s)"; } + $Output_Generated++; } #----- all about authetication and failures (shown at detail > 0) --------------------------- @@ -791,6 +865,7 @@ foreach my $Reason (sort keys %AuthDisconnectedWithPending) { print "\n $Reason: $AuthDisconnectedWithPending{$Reason} Time(s)"; } + $Output_Generated++; } if ( ( $DetailAuthTimedOut >= 5 ) and ( keys %AuthTimedOut ) ) { @@ -804,6 +879,7 @@ } print ") $Total Time(s)"; } + $Output_Generated++; } if ( ( $DetailIndividualInput >= 5 ) and ( keys %AuthInvalidInput ) ) { @@ -817,6 +893,7 @@ } print ") $Total Time(s)"; } + $Output_Generated++; } if ( ( $DetailAuthUsernameChars >= 5 ) and ( keys %AuthUsernameChars ) ) { @@ -824,10 +901,12 @@ foreach my $IP ( sort keys %AuthUsernameChars ) { print "\n $IP: $AuthUsernameChars{$IP} Time(s)"; } + $Output_Generated++; } if ( ( $DetailTLSInit >= 5 ) and ( $TLSInitFail > 0 ) ) { print "\n\nTLS initialization failed $TLSInitFail Time(s)"; + $Output_Generated++; } #----- all about deliveries and failures (shown at detail > 0) ------------------------------ @@ -852,6 +931,7 @@ } } } + $Output_Generated++; } if ( ( $DetailLdaSieveForwards >= 5 ) and ( keys %Forwarded ) ) { @@ -866,6 +946,7 @@ } } print "\n\n Total: $TotalForwarded Time(s)"; + $Output_Generated++; } if ( ( $DetailVacationResponse >= 5 ) and ( keys %VacationResponse ) ) { @@ -879,6 +960,7 @@ } } print "\n\n Total: $TotalVacResp Time(s)"; + $Output_Generated++; } if ( ( $DetailVacationDup >= 5 ) and ( keys %VacationDup ) ) { @@ -892,6 +974,7 @@ } } print "\n\n Total: $TotalVacDup Time(s)"; + $Output_Generated++; } #----- all about mailbox manipulations (shown at detail > 0) -------------------------------- @@ -916,6 +999,7 @@ } } } + $Output_Generated++; } if ( ( $DetailMailboxDeleted >= 5 ) and ( keys %MailboxDeleted ) ) { @@ -938,6 +1022,7 @@ } } } + $Output_Generated++; } if ( ( $DetailMailboxRenamed >= 5 ) and ( keys %MailboxRenamed ) ) { @@ -960,6 +1045,7 @@ } } } + $Output_Generated++; } if (keys %OtherList) { @@ -967,10 +1053,11 @@ foreach my $line (sort {$a cmp $b} keys %OtherList) { print " $line: $OtherList{$line} Time(s)\n"; } + $Output_Generated++; } # guarantees at least one empty line at the end -print "\n"; +print "\n" if $Output_Generated; exit(0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/postfix new/logwatch-7.14/scripts/services/postfix --- old/logwatch-7.13/scripts/services/postfix 2025-03-02 23:05:02.000000000 +0100 +++ new/logwatch-7.14/scripts/services/postfix 2025-12-24 02:41:00.000000000 +0100 @@ -61,7 +61,8 @@ our $re_QID; our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d\.\d\.\d+)?)/; -our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, dsn=[\d.]+)?)/; +# postfix >= 3.11 will log TLS feature information in delivery status logging by default (tls=) +our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, tls=[^,]*)?(?:, dsn=[\d.]+)?)/; #MODULE: ../Logreporters/Utils.pm package Logreporters::Utils; @@ -3287,14 +3288,30 @@ } ### sent, forwarded, bounced, softbounce, deferred, (un)deliverable + # + # postfix >= 3.11 will log TLS feature information in delivery status logging by default (tls=) + # modified $re_DDD detects the corresponding tls= part, now + # elsif ($p1 =~ s/^to=<(.*?)>,(?: orig_to=<(.*?)>,)? relay=([^,]*).*, ($re_DDD), status=(\S+) //o) { ($relay,$status) = ($3,$5); my ($to,$origto,$localpart,$domainpart,$dsn,$p1) = process_delivery_attempt ($1,$2,$4,$p1); + my ($tlsfeatures) = $4 =~ /tls=([^,]+)/; + if ($tlsfeatures ne '') { + $domainpart = $domainpart . " (tls=" . $tlsfeatures . ")"; + } + + # postfix <= 3.10: + # #TD 552B6C20E: to=<[email protected]>, relay=mail.example.net[10.0.0.1]:25, delay=1021, delays=1020/0.04/0.56/0.78, dsn=2.0.0, status=sent (250 Ok: queued as 6EAC4719EB) #TD 552B6C20E: to=<[email protected]>, relay=mail.example.net[10.0.0.1]:25, conn_use=2 delay=1021, delays=1020/0.04/0.56/0.78, dsn=2.0.0, status=sent (250 Ok: queued as 6EAC4719EB) #TD DD925BBE2: to=<[email protected]>, orig_to=<[email protected]>, relay=mail.example.net[2001:dead:beef::1], delay=2, status=sent (250 Ok: queued as 5221227246) + # + # postfix >= 3.11: + # + #TD4d9bVw113Wz1SwX: to=<[email protected]>, relay=mail.example.org[10.0.01]:25, delay=3.2, delays=0.09/0.05/1.8/1.2, tls=dane, dsn=2.0.0, status=sent (250 OK id=1vLFwP-00000008xhU-3ZkI) + #TD4d9bVw113Wz1SwX: to=<[email protected]>, relay=mail.example.org[10.0.01]:25, delay=3.2, delays=0.09/0.05/1.8/1.2, tls=may, dsn=2.0.0, status=sent (250 OK id=1vLFwP-00000008xhU-3ZkI) ### sent if ($status eq 'sent') { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/sendmail new/logwatch-7.14/scripts/services/sendmail --- old/logwatch-7.13/scripts/services/sendmail 2025-07-12 23:00:54.000000000 +0200 +++ new/logwatch-7.14/scripts/services/sendmail 2025-12-24 02:41:00.000000000 +0100 @@ -1495,7 +1495,7 @@ } } } - if (defined keys %StarttlsCipher) { + if (keys %StarttlsCipher) { eval "$PrintCond"; print "\n\nSTARTTLS used the following encryption mechanisms"; foreach $StarttlsCipherEntry (sort keys %StarttlsCipher) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/sshd new/logwatch-7.14/scripts/services/sshd --- old/logwatch-7.13/scripts/services/sshd 2024-12-02 05:48:27.000000000 +0100 +++ new/logwatch-7.14/scripts/services/sshd 2025-12-24 02:41:00.000000000 +0100 @@ -140,6 +140,8 @@ $NegotiationFailed{$Reason}{$Host}{$Offer}++; } elsif ( ($Host) = ($ThisLine =~ /^Connection reset by ([^ ]+)(?: port \d+)?/) ) { $NegotiationFailed{$Reason}{$Host}{$Offer}++; + } elsif ( ($Host) = ($ThisLine =~ /^Connection closed by authenticating user [^ ]+ ([^ ]+)(?: port \d+)?/) ) { + $NegotiationFailed{$Reason}{$Host}{$Offer}++; } } @@ -160,7 +162,7 @@ ($ThisLine =~ m/^Disconnecting: Command terminated on signal \d+/) or ($ThisLine =~ m/^Disconnecting: server_input_channel_req: unknown channel -?\d+/) or ($ThisLine =~ m/^connect from \d+\.\d+\.\d+\.\d+/) or - ($ThisLine =~ m/^fatal: Timeout before authentication/ ) or + ($ThisLine =~ m/^(fatal: )?Timeout before authentication/ ) or ($ThisLine =~ m/^fatal: no hostkey alg/) or ($ThisLine =~ m/Connection from .* port /) or ($ThisLine =~ m/Postponed (keyboard-interactive|publickey) for [^ ]+ from [^ ]+/) or @@ -249,6 +251,7 @@ ($ThisLine =~ m/^(?:error:.*|fatal:) Connection closed by remote host/ ) or ($ThisLine =~ m/^(|fatal: )Read error from remote host(| [^ ]+)(| port \d+): Connection reset by peer/ ) or ($ThisLine =~ m/^error: .*: read: Connection reset by peer/ ) or + ($ThisLine =~ m/^error: .*: write: Broken pipe/ ) or ($ThisLine =~ m/^Read error from remote host [^ ]+(| port \d+): (Connection timed out|No route to host)/ ) or ($ThisLine =~ m/^fatal: Read from socket failed: No route to host/) or ($ThisLine =~ m/^fatal: Write failed: Network is unreachable/ ) or @@ -265,10 +268,10 @@ if ( $Debug >= 5 ) { print STDERR "DEBUG: Found -Signal 15 Terminating- line\n"; } - } elsif ( $ThisLine =~ m/^(log: )?Server listening on( [^ ]+)? port \d+/ ) { #ssh/openssh + } elsif ( ($Port) = ($ThisLine =~ m/^(log: )?Server listening on(( [^ ]+)? port \d+)/ ) ) { #ssh/openssh $Starts++; if ( $Debug >= 5 ) { - print STDERR "DEBUG: Found -Listening on port 22- line\n"; + print STDERR "DEBUG: Found -Listening on ${Port}- line\n"; } } elsif ( ($Port,$Address,$Reason) = ($ThisLine =~ /^error: Bind to port ([^ ]+) on ([^ ]+) failed: (.+).$/ )) { my $Temp = "$Address port $Port ($Reason)"; @@ -321,7 +324,9 @@ $multiline++; } elsif ( ($Reason,$Offer) = ($ThisLine =~ /^error: (kex_exchange_identification): (.*)$/) ) { $multiline++; - } elsif ( ($Reason,$Offer) = ($ThisLine =~ /^error: (kex protocol error): (.*)$/) ) { + } elsif ( ($Reason,$Offer) = ($ThisLine =~ /^error: (kex protocol error|key_protocol_error): (.*)$/) ) { + $multiline++; + } elsif ( ($Reason,$Offer) = ($ThisLine =~ /^(userauth_pubkey): (.*)( \[preaut\])?$/) ) { $multiline++; } elsif ( ($Prio,$Host,$Port,$Code,$Reason) = ($ThisLine =~ /^(error: )?Received disconnect from ([^ ]*)( port \d+)?: ?(\d+): (.*)$/)) { # Reason 11 ({SSH,SSH2}_DISCONNECT_BY_APPLICATION) is expected, and logged at severity level INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logwatch-7.13/scripts/services/zz-disk_space new/logwatch-7.14/scripts/services/zz-disk_space --- old/logwatch-7.13/scripts/services/zz-disk_space 2025-04-06 23:17:52.000000000 +0200 +++ new/logwatch-7.14/scripts/services/zz-disk_space 2025-12-24 02:41:00.000000000 +0100 @@ -65,9 +65,9 @@ }; $Dir = $Dir . "/*"; # Add /* to the end of the directory name for globbing -mgt if ($OSname eq "Linux") { - system("du -s --block-size=1048576 -h $Dir | sort -n -r -k 1"); + system("du -s --block-size=1048576 -h $Dir | sort -h -r -k 1"); } elsif ($OSname eq "Darwin") { - system("du -s --block-size=1048576 -h $Dir | sort -n -r -k 1"); + system("du -s --block-size=1048576 -h $Dir | sort -h -r -k 1"); } elsif ($OSname eq "SunOS") { if ( ($release eq "5.10") || ($release eq "5.9") || ($release eq "5.11") ) { system("/usr/xpg4/bin/du -s -h $Dir | sort -n -r -k 1"); @@ -163,7 +163,7 @@ #Main if ($OSname eq "Linux") { - $df_options = "-h -x tmpfs -x devtmpfs -x udf -x iso9660 -x squashfs -x overlay"; + $df_options = "-h -x tmpfs -x devtmpfs -x udf -x iso9660 -x squashfs -x overlay -x nsfs"; if ($local_disks_only) { $df_options .= " -l"; } } elsif ($OSname eq "Darwin") { $df_options = "-h -T nodevfs,autofs";
