[Dovecot] LIST command -- quoting of folder names
If I open an imap connection to a local maildir installation like so:
/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/.mail/account/:LAYOUT=fs
And issue:
c list "" *
This is the result (this is a gmail account):
- LIST (\HasChildren) "/" [Gmail]
- LIST (\HasNoChildren) "/" [Gmail]/Spam
- LIST (\HasNoChildren) "/" [Gmail]/Starred
- LIST (\HasNoChildren) "/" [Gmail]/Trash
- LIST (\HasNoChildren) "/" [Gmail]/Drafts
- LIST (\HasNoChildren) "/" "[Gmail]/Sent Mail"
- LIST (\HasNoChildren) "/" [Gmail]/Important
- LIST (\HasNoChildren) "/" INBOX
Only "[Gmail]/Sent Mail" is quoted. This is messing up gnus, my MUA, which truncates other folder names after the / separator.
Examples of testing I've seen online have shown all folder names quoted, which would allow things to work correctly here. Is this something I can affect with local configuration, or is there some other solution? Would removing "LAYOUT=fs" affect this issue?
Thanks! Eric
Output of dovecot -n:
# 2.2.4: /etc/dovecot/dovecot.conf # OS: Linux 3.9.7-1-ARCH i686 Arch Linux info_log_path = /var/log/dovecot-info.log log_path = /var/log/dovecot.log protocols = imap
On 30.6.2013, at 5.02, Eric Abrahamsen eric@ericabrahamsen.net wrote:
- LIST (\HasChildren) "/" [Gmail]
- LIST (\HasNoChildren) "/" [Gmail]/Spam
- LIST (\HasNoChildren) "/" [Gmail]/Starred
- LIST (\HasNoChildren) "/" [Gmail]/Trash
- LIST (\HasNoChildren) "/" [Gmail]/Drafts
- LIST (\HasNoChildren) "/" "[Gmail]/Sent Mail"
- LIST (\HasNoChildren) "/" [Gmail]/Important
- LIST (\HasNoChildren) "/" INBOX
Only "[Gmail]/Sent Mail" is quoted. This is messing up gnus, my MUA, which truncates other folder names after the / separator.
RFC 3501:
list = "LIST" SP mailbox SP list-mailbox list-mailbox = 1*list-char / string list-char = ATOM-CHAR / list-wildcards / resp-specials ATOM-CHAR = <any CHAR except atom-specials> atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials list-wildcards = "%" / "*" resp-specials = "]"
Looks to me like all the characters in the mailbox names are list-chars, so this would be a gnus bug. Unless this affects some widely used client I'd rather not change Dovecot to unnecessarily add quotes where they're not needed.
Examples of testing I've seen online have shown all folder names quoted, which would allow things to work correctly here. Is this something I can affect with local configuration, or is there some other solution? Would removing "LAYOUT=fs" affect this issue?
You can't affect this without modifying source code.
Timo Sirainen tss@iki.fi writes:
On 30.6.2013, at 5.02, Eric Abrahamsen eric@ericabrahamsen.net wrote:
- LIST (\HasChildren) "/" [Gmail]
- LIST (\HasNoChildren) "/" [Gmail]/Spam
- LIST (\HasNoChildren) "/" [Gmail]/Starred
- LIST (\HasNoChildren) "/" [Gmail]/Trash
- LIST (\HasNoChildren) "/" [Gmail]/Drafts
- LIST (\HasNoChildren) "/" "[Gmail]/Sent Mail"
- LIST (\HasNoChildren) "/" [Gmail]/Important
- LIST (\HasNoChildren) "/" INBOX
Only "[Gmail]/Sent Mail" is quoted. This is messing up gnus, my MUA, which truncates other folder names after the / separator.
RFC 3501:
list = "LIST" SP mailbox SP list-mailbox list-mailbox = 1*list-char / string list-char = ATOM-CHAR / list-wildcards / resp-specials ATOM-CHAR = <any CHAR except atom-specials> atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials list-wildcards = "%" / "*" resp-specials = "]"
Looks to me like all the characters in the mailbox names are list-chars, so this would be a gnus bug. Unless this affects some widely used client I'd rather not change Dovecot to unnecessarily add quotes where they're not needed.
Examples of testing I've seen online have shown all folder names quoted, which would allow things to work correctly here. Is this something I can affect with local configuration, or is there some other solution? Would removing "LAYOUT=fs" affect this issue?
You can't affect this without modifying source code.
Good to know, thanks! I'll work on it in from the gnus end, it should be relatively easy to fix there.
Eric
participants (2)
-
Eric Abrahamsen
-
Timo Sirainen