Michal Krzysztofowicz
2019-Jun-14 14:20 UTC
Dovecot LMTP rejecting mail from address with apostrophe
Hi, I have an OpenSMTPD / Dovecot installation on an OpenBSD server. I recently came across an issue where Dovecot LMTP would reject a message sent to a local user from an address which contains a single apostrophe (e.g. firstname.o'lastname at example.com). Apparently apostrophe, as well as a number of other special characters, are valid characters in the local part of the email address (that's everything to the left of the @ character). The message I get in the logs is: Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery evpid=56aed6237d6444a0 from=<firstname.o'lastname at example.com> to=<me at example.org> rcpt=<me at example.org> user=me delay=0s result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid FROM: Invalid character in localpart") where example.com is external domain and example.org is a local one. The part of the message: LMTP server error: 501 5.5.4 Invalid FROM: Invalid character in localpart is returned by dovecot-lmtp. I?ve had a brief look at the source code, and it seems the responsible code is somewhere inside src/lib-smtp/smtp-address.c and, if I understand the code correctly, the address parsing in actually done in src/lib-smtp/smtp-parser.c. My question is is there a configuration option, similar to auth_username_chars which lists valid characters in the email address, to stop Dovecot LMTP from rejecting such emails? or maybe you know another way of getting it to accept an email from such address? My dovecot version is: $ dovecot --version 2.3.5.1 (7ec6d0ade) And in case that makes any difference, I'm running OpenBSD 6.5 patched to 005_libssl. Thanks! Mike -- Michal Krzysztofowicz http://beautifulocean.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3923 bytes Desc: not available URL: <https://dovecot.org/pipermail/dovecot/attachments/20190614/e5394659/attachment-0001.p7s>
Daniel Lange
2019-Jun-14 16:01 UTC
Dovecot LMTP rejecting mail from address with apostrophe
Am 14.06.19 um 16:20 schrieb Michal Krzysztofowicz via dovecot:> Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery evpid=56aed6237d6444a0 from=<firstname.o'lastname at example.com> to=<me at example.org> rcpt=<me at example.org> user=me delay=0s result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid FROM: Invalid character in localpart")That's essentially the same bug as mentioned in <6386018f-22b2-9562-b5a2-36e81cbe2892 at debian.org> (bounces on invalid UTF-8 in localpart) that got assigned DOP-1045. Dovecot LDA and LMTP should just not care about remote address validity when delivering locally. It's not the LDA's business.
Michal Krzysztofowicz
2019-Jun-14 22:36 UTC
Dovecot LMTP rejecting mail from address with apostrophe
> On 14 Jun 2019, at 17:01, Daniel Lange <DLange at debian.org> wrote: > > Am 14.06.19 um 16:20 schrieb Michal Krzysztofowicz via dovecot: >> Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery evpid=56aed6237d6444a0 from=<firstname.o'lastname at example.com> to=<me at example.org> rcpt=<me at example.org> user=me delay=0s result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid FROM: Invalid character in localpart") > > That's essentially the same bug as mentioned in <6386018f-22b2-9562-b5a2-36e81cbe2892 at debian.org> (bounces on invalid UTF-8 in localpart) that got assigned DOP-1045. Dovecot LDA and LMTP should just not care about remote address validity when delivering locally. It's not the LDA's business.Ah, thanks a lot for that. I was trying to find any information about that, but couldn?t really (perhaps my google-fu isn?t that great)! Would you know if Dovecot project uses an issue tracker which is publicly available, and which I can check? I didn?t see Issues section on the GitHub page with the repo.. Thanks again! Best Regards, mike -- Michal Krzysztofowicz http://beautifulocean.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3923 bytes Desc: not available URL: <https://dovecot.org/pipermail/dovecot/attachments/20190614/d0000310/attachment-0001.p7s>
Seemingly Similar Threads
- Dovecot LMTP rejecting mail from address with apostrophe
- Dovecot LMTP rejecting mail from address with apostrophe
- Dovecot LMTP rejecting mail from address with apostrophe
- Dovecot LDA error - Invalid -f parameter: Invalid character in path
- Dovecot LMTP rejecting mail from address with apostrophe