Arnon Weinberg
2013-Oct-14 05:24 UTC
[Dovecot] Email address with special characters in userdb
Hi, I have a userdb file set up in passwd-file format containing the following entries: >doveadm user test1*test2 at test.com test1-test2 at test.com test1?test2 at test.com test1 at test2@test.com test1%test2 at test.com I can access the 1st entry (no special characters) no problem: >doveadm user test1-test2 at test.com -f home /var/vmail The 2nd entry (using UTF-8 encoding) doesn't come up: >doveadm user test1?test2 at test.com -f home userdb lookup: user test1?test2 at test.com doesn't exist The 3rd entry does come up: >doveadm user test1 at test2@test.com -f home /var/vmail but Postfix escapes this case using quotes, and they don't work: >doveadm user '"'test1 at test2'"'@test.com userdb lookup: user "test1 at test2"@test.com doesn't exist The 4th entry does not come up at all: >doveadm user test1%test2 at test.com -f home userdb lookup: user test1%test2 at test.com doesn't exist I believe these are all valid characters for email addresses (per the RFC) except '@' (which ironically works without escaping). How can I get them working? >dovecot --version 2.1.16 -- Arnon Weinberg www.back2front.ca
On Mon, Oct 14, 2013 at 01:24:45AM -0400, Arnon Weinberg wrote:> I have a userdb file set up in passwd-file format containing the > following entries: > >doveadm user test1*test2 at test.com > test1-test2 at test.com > test1?test2 at test.com > test1 at test2@test.com > test1%test2 at test.comsnip> I believe these are all valid characters for email addresses (per > the RFC) except '@' (which ironically works without escaping).No exception is made for "@". *All* 7-bit printable characters, ASCII 32 through 127, are allowed. RFC 5321.> How can I get them working? > > >dovecot --version > 2.1.16See auth_username_chars in your conf.d/10-auth.conf file. RFC 5321 notwithstanding, it's reasonable and usually a good idea to limit the characters that YOUR SITE will allow in usernames. You can still send mail to <"eat at Joe's"@example.com>, but in general, if you plan to use such addresses in your own domains, you should consider rewriting them in your MTA (aliases(5) or similar.) -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: