RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1952629 - Logwatch lists sieve "stored mail into mailbox" entries as unmatched
Summary: Logwatch lists sieve "stored mail into mailbox" entries as unmatched
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: logwatch
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Vincent Mihalkovič
QA Contact: Karel Volný
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
Last Closed: 2021-11-09 19:39:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


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


Links
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
logwatch-7.4.3-9.el8.noarch
dovecot-2.3.8-4.el8.x86_64

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:

https://sourceforge.net/p/logwatch/bugs/84/

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.

https://access.redhat.com/errata/RHBA-2021:4397


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