Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#60528 - [dovecot] quota-check error when e-mail is of type "A quoted-string"@domain

Attached to Project: Community Packages
Opened by Thorsten (Thorsten) - Monday, 22 October 2018, 12:45 GMT
Last edited by Balló György (City-busz) - Saturday, 30 March 2019, 08:45 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Johannes Löthberg (demize)
Thore Bödecker (foxxx0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
RFC 5322, §"3.4.1. Addr-Spec Specification":
"...
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
..."

When receiving a e-mail address like "John Smith"@example.com" and Dovecot quota-check is enabled and linked with Postfix as describe in "https://wiki2.dovecot.org/Quota" then this error append in logs:

"quota-status: Error: quota-status: Client sent invalid recipient address: Invalid character in path"

As we can see RFC specifies that a quoted-sting is allowed so local part "John Smith" is valid.
If quota-check is removed, this e-mail is perfectly accepted by Postfix.

Additional info:
* package version(s): dovecot 2.3.3 / postfix 3.3.1

This task depends upon

Closed by  Balló György (City-busz)
Saturday, 30 March 2019, 08:45 GMT
Reason for closing:  No response
Comment by loqs (loqs) - Monday, 22 October 2018, 21:46 GMT
Have you reported the issue upstream?
Comment by Thorsten (Thorsten) - Tuesday, 23 October 2018, 07:34 GMT
Someone have done it, but there is no answer: "https://www.mail-archive.com/dovecot@dovecot.org/msg74833.html"
Comment by Thore Bödecker (foxxx0) - Saturday, 24 November 2018, 09:40 GMT
I'm unable to reproduce this issue.

You need to make sure to set:
auth_username_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ \""

The quota-status service will perform validity checks on the recipient address.
As stated in the bug report on the Mailing List I would like you to build dovecot yourself with the patch provided on the ML, so that the error message displays some additional info.
If you are not able to build dovecot with the patch, just let me know and I can provide a patched and signed package for you.

Since I am not able to reproduce the issue, there really is nothing else I can do.

If you need any any assistance, feel free to contact me over IRC or Email.
Comment by Thorsten (Thorsten) - Saturday, 24 November 2018, 16:47 GMT
1) I have checked "auth_username_chars" value and it was the default one:
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@

So I have changed with your value and checked:
doveadm config |grep auth_username_chars
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ "

But unfortunately the problem is still there.

Comment into /usr/share/doc/dovecot/example-config/conf.d/10-auth.conf says:

"List of allowed characters in username. If the user-given username contains
# a character not listed in here, the login automatically fails. This is just
# an extra check to make sure user can't exploit any potential quote escaping
# vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
# set this value to empty."

So apparently that is not a problem related to authentication, but rather a communication problem between dovecot and postfix.

2) I have parched dovecote with the ML's patch and the log output is:
"quota-status: Error: quota-status: Client sent invalid recipient address `John Smith@keit.eu': Invalid character in path"

3) You said you could not reproduce the problem:

- If you have sent yourself a mail on the same mail sever, the problem is not present because the mail path into postfix is not the same as when SMTP protocol is used from external incoming mail!

- Have you checked dovecot quota is really working?

Loading...