Bug 1952629 - Logwatch lists sieve "stored mail into mailbox" entries as unmatched
Summary: Logwatch lists sieve "stored mail into mailbox" entries as unmatched
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: logwatch
Version: 8.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: ---
Assignee: Vincent Mihalkovič
QA Contact: Karel Volný
Depends On:
TreeView+ depends on / blocked
Reported: 2021-04-22 17:12 UTC by Juan Manuel Santos
Modified: 2021-11-10 08:03 UTC (History)
2 users (show)

Fixed In Version: logwatch-7.4.3-11.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-11-09 19:39:15 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)
Example /var/log/maillog excerpt that triggers the issue (376 bytes, text/plain)
2021-05-20 13:46 UTC, Juan Manuel Santos
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4397 0 None None None 2021-11-09 19:39:16 UTC

Description Juan Manuel Santos 2021-04-22 17:12:17 UTC
Description of problem:
When using Dovecot and sieve to deliver emails into mailboxes, the sieve log messages of "stored mail into mailbox"

Version-Release number of selected component (if applicable):
RHEL 8.3

How reproducible:
Every time

Steps to Reproduce:
1. Set up Postfix with Dovecot as LDA, using sieve to filter emails
2. Send an email for local delivery that uses Postfix -> Dovecot LDA -> sieve
3. Wait for the daily logwatch mail message to be sent, or change "Range = yesterday" to "Range = All" in logwatch's configuration, and run /etc/cron.daily/0logwatch

Actual results:

Logwatch sends the sieve "stored mail into mailbox" messages as unmatched entries:

 --------------------- Dovecot Begin ------------------------ 

 **Unmatched Entries**
    dovecot[88830]: lda(user)<88830><66cjAfWmgWD+WgEAzVjm2Q>: sieve: msgid=<20210422164020.E0F59316694D.com>: stored mail into mailbox 'INBOX': 1 Time(s)

Expected results:
Logwatch should not list these messages as unmatched, instead counting them as deliveries:

 --------------------- Dovecot Begin ------------------------ 

 Dovecot Deliveries: 1

Additional info:

After some research, it appears this is already fixed in a newer upstream version:


To test this, line 189 of /usr/share/logwatch/scripts/services/dovecot can be changed from this:

} elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {

to this (taken from logwatch 7.5.3 and adapted for 7.4.3 syntax):

} elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\)(?:<[^>]+><[^>]+>)?: sieve: msgid=.*: stored mail into mailbox '(.*)'/ ) ) {

Comment 4 Karel Volný 2021-05-20 13:00:18 UTC
pls, could you provide sample dovecot log that exhibits the problem, so that I can use it to write a minimal testcase, instead of trying to set up the whole chain with sieve?

Comment 5 Juan Manuel Santos 2021-05-20 13:46:30 UTC
Created attachment 1785183 [details]
Example /var/log/maillog excerpt that triggers the issue

Comment 6 Karel Volný 2021-05-21 09:39:10 UTC
(In reply to Juan Manuel Santos from comment #5)
> Created attachment 1785183 [details]
> Example /var/log/maillog excerpt that triggers the issue

thanks ... only now I have realised that I could have taken the line from the bug description, truncating logwatch's counter

Comment 9 errata-xmlrpc 2021-11-09 19:39:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (logwatch bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.