From a85c429a857c21b64bf3c510f63f86bc2bf3d2df Mon Sep 17 00:00:00 2001 From: Arno Hautala Date: Sun, 19 Dec 2021 08:33:59 -0500 Subject: [PATCH] regex change to exclude comma from sasl_username (#2074) as proposed in #2071 by @jvolkenant --- management/mail_log.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/management/mail_log.py b/management/mail_log.py index 59c32c6e..bdf757cc 100755 --- a/management/mail_log.py +++ b/management/mail_log.py @@ -549,8 +549,9 @@ def scan_postfix_submission_line(date, log, collector): """ # Match both the 'plain' and 'login' sasl methods, since both authentication methods are - # allowed by Dovecot - m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)", log) + # allowed by Dovecot. Exclude trailing comma after the username when additional fields + # follow after. + m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)(?