Package: logwatch
Version: 7.4.3+git20161207-2
Followup-For: Bug #906045

This bug also affects other dovecot sieve loglines. For example, I have seen 
the following line:

Aug 14 10:57:46 black dovecot: 
lda(default-user)<20273><j6pyB5qnclsxTwAAy7SJiA>: sieve: 
msgid=<1790644118.7505868.1534240625135.javamail....@lsg1-app0979.prod.linkedin.com>:
 forwarded to <cobb@localhost>

In an attempt to catch all the sieve log lines I have updated my patch.
Note this has only been tested for the log line above and the ones in the 
original report.

--- /usr/share/logwatch/scripts/services/dovecot        2017-01-21 
16:44:03.000000000 +0000
+++ dovecot     2018-08-15 17:37:43.169601152 +0100
@@ -221,7 +221,7 @@
       $Deliver{$User}{$Mailbox}++;
 
 # For Sieve-based delivery
-   } elsif (my ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag 
(?:lda|deliver)\((.*)\): sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {
+   } elsif (my ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag 
(?:lda|deliver)\((.*)\).*: sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) 
) {
       $Deliver{$User}{$Mailbox}++;
 
 # LMTP-based delivery
@@ -230,21 +230,21 @@
       $Deliver{$User}{$Mailbox}++;
 
 # LMTP-based Sieve delivery
-   } elsif (my ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\((?:\d+, 
)?(.*?)\): .*: sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {
+   } elsif (my ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\((?:\d+, 
)?(.*?)\).*: .*: sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {
       $Deliver{$User}{$Mailbox}++;
 
 # sieve forward
-   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*?)\):(?: [^:]+:)? sieve: msgid=.* forwarded 
to \<(.*)\>/)) {
+   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*?)\).*:(?: [^:]+:)? sieve: msgid=.* 
forwarded to \<(.*)\>/)) {
       $Forwarded{$User}{$Recip}++;
 
 # sieve vacation
-   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*)\):(?: .*:)? sieve: msgid=.* sent vacation 
response to \<(.*)\>/)) {
+   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*)\).*:(?: .*:)? sieve: msgid=.* sent 
vacation response to \<(.*)\>/)) {
       $VacationResponse{$User}{$Recip}++;
 
-   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*)\):(?: .*:)? sieve: msgid=.* discarded 
duplicate vacation response to \<(.*)\>/ )) {
+   } elsif (my ($User, $Recip) = ($ThisLine =~ /^$dovecottag 
(?:lda|deliver|lmtp)\((?:\d+, )?(.*)\).*:(?: .*:)? sieve: msgid=.* discarded 
duplicate vacation response to \<(.*)\>/ )) {
       $VacationDup{$User}{$Recip}++;
 
-   } elsif ( $ThisLine =~ /^$dovecottag (?:lda|deliver|lmtp)\(.*\): .*sieve: 
msgid=.* marked message to be discarded if not explicitly delivered/ ) {
+   } elsif ( $ThisLine =~ /^$dovecottag (?:lda|deliver|lmtp)\(.*\).*: .*sieve: 
msgid=.* marked message to be discarded if not explicitly delivered/ ) {
    # dovecot: lda(joe): sieve: msgid=<m$01$@com>: marked message to be 
discarded if not explicitly delivered (discard action)
    # IGNORE
    } elsif ( $ThisLine =~ /^$dovecottag lmtp\(.*\): Connect from/ ) {


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_IE.utf8), LANGUAGE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_IE.utf8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages logwatch depends on:
ii  perl                            5.26.1-6
ii  postfix [mail-transport-agent]  3.3.0-1

Versions of packages logwatch recommends:
ii  libdate-manip-perl   6.72-1
pn  libsys-cpu-perl      <none>
ii  libsys-meminfo-perl  0.99-1+b2

Versions of packages logwatch suggests:
ii  fortune-mod  1:1.99.1-7+b1

-- no debconf information

Reply via email to