[UA-EAI] IMAP mailbox/folder support

Arnt Gulbrandsen arnt.gulbrandsen at icann.org
Tue Feb 28 17:31:12 UTC 2023


Hi,

This may be slightly too long.

RFC 3501, dated March 2003, extends the folder naming rules of the previous versions of IMAP. In the new version there’s support for Unicode folder names, and it’s mandatory, and I believe that it’s also widely implemented. There are a couple of mandatory aspects of 3501 that software sometimes… but I digress. Unicode names aren’t one of those areas.

So support for Unicode folder names has been mandatory for almost 20 years. So far so good.

RFC 6855, the one that adds EAI support to IMAP, adds something new, namely UTF-8 support for folder names. Confused yet? Well, the older RFC had support for Unicode, but used a tortuous encoding called mUTF-7 instead of nice sensible UTF-8. mUTF-7 is bad. It’s a pain for people like myself, but for end-users mUTF-7 and UTF-8 are equivalent. You could have a folder called maßkrug before and you could have one afterwards, the only difference is that the SELECT command sent to the server is easier to read and debug for nerds to need to read and debug protocol traces. All praise nerds and let’s make their job simpler. It is however doubtful to me that IMAP.18 has any place in the Guide, given that the functionality it tests is mandatory in unextended IMAP.

Now to Harsha’s mailboxes.

Harsha uses Sendmail, Dovecot and Roundcube on Centos. Sendmail basically doesn’t use logins/passwords, it bases its decisions mostly on IP addresses and outsources the last question to either the system login database or to Dovecot’s database, which is often also the system login database. Roundcube makes no decisions, it does whatever Dovecot uses. Dovecot is very configurable. It can be configured to use the system’s logins/passwords or to have a database of its own. In addition, both Sendmail and Dovecot support aliases, so you can have an ASCII login, an email address that corresponds exactly to the login, and another email address that’s configured in a table.

The Centos system mostly supports Unicode for logins and passwords. I believe most scripts are perfectly supported, but it ought to have problems with a few, since it doesn’t do the transformations described in RFC 4013. (RFC 4013 are generally not binding on Centos, but they exist for a reason, and the reason applies to Centos.)

Sendmail supports EAI well, except that if the system/Dovecot database has restrictions, Sendmail will have some of the same restrictions. This means that if you use just Sendmail+CentOS, EAI will tend to work, except for the few scripts where RFC4013 makes a difference. Using Sendmail+CentOS+Mutt is the same: Should work perfectly, as far as I understand.

Dovecot has only accidental support for EAI. If you configure it to use the system’s login database, it’ll partly work. It’s not exactly tested, but some things work anyway. Receiving and reading mail along the chain Sendmail Dovecot Mutt will generally work, replies… Harsha: I’m not at all surprised if you get a weird patchwork of features that work and don’t 😉

I did a three-line change to Roundcube to get it to work. That still hasn’t been merged, I have to explain and persuade. Without the patch it’ll be another of those patchworks, where some things work by accident. I have the impression that many things work by accident if you use Sendmail, Dovecot and Roundcube together. Folder names using Unicode ought to work, for example, but if a message arrives with From/To/Cc grå@xn--gr-zia.rg<mailto:grå@xn--gr-zia.rg> it’ll be displayed that way instead of a more sensible grå@grå.org<mailto:grå@grå.org>.

--
Arnt Gulbrandsen
UA Technology Sr. Manager, ICANN
+32 492 374706
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mm.icann.org/pipermail/ua-eai/attachments/20230228/439cd60c/attachment.html>


More information about the UA-EAI mailing list