mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-25 02:47:04 +00:00
regex change to exclude comma from sasl_username (#2074)
as proposed in #2071 by @jvolkenant
This commit is contained in:
parent
50a5cb90bc
commit
a85c429a85
@ -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
|
# Match both the 'plain' and 'login' sasl methods, since both authentication methods are
|
||||||
# allowed by Dovecot
|
# allowed by Dovecot. Exclude trailing comma after the username when additional fields
|
||||||
m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)", log)
|
# follow after.
|
||||||
|
m = re.match("([A-Z0-9]+): client=(\S+), sasl_method=(PLAIN|LOGIN), sasl_username=(\S+)(?<!,)", log)
|
||||||
|
|
||||||
if m:
|
if m:
|
||||||
_, client, method, user = m.groups()
|
_, client, method, user = m.groups()
|
||||||
|
Loading…
Reference in New Issue
Block a user