[Dovecot] Deleting a folder with & character
Hello,
One of my users has a mailbox named 'INBOX.Kron & SPM' (maybe created a
long time ago, when we use courier imap as pop/imap server, but I'm not sure).
I can see the maildir with a doveadm list command:
amateo_adm@myotis31:~$ sudo doveadm mailbox list -u <user> ... INBOX.Kron & SPM ...
but I can't delete it, neithe rename it:
amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron & SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron & SPM: Mailbox doesn't exist: INBOX.Kron &- SPM amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron \& SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron \& SPM: Mailbox doesn't exist: INBOX.Kron \&- SPM
is there any way to delete it with doveadm command? should I use a
specific syntax or escape to indicate the name?
On 19/09/12 09:22, Angel L. Mateo wrote:
Hello,
One of my users has a mailbox named 'INBOX.Kron & SPM' (maybe
created a long time ago, when we use courier imap as pop/imap server, but I'm not sure).
I can see the maildir with a doveadm list command:
amateo_adm@myotis31:~$ sudo doveadm mailbox list -u <user> ... INBOX.Kron & SPM ...
but I can't delete it, neithe rename it:
amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron & SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron & SPM: Mailbox doesn't exist: INBOX.Kron &- SPM amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron \& SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron \& SPM: Mailbox doesn't exist: INBOX.Kron \&- SPM
is there any way to delete it with doveadm command? should I use a
specific syntax or escape to indicate the name?
Hi,
I see something similar when I try to doveadm import maildir folders (to mdbox) with ampersands - I get the same "Mailbox doesn't exist: INBOX.Foo &- Bar" with that extraneous hyphen.
Cheers
Alex
-- This message is intended only for the addressee and may contain confidential information. Unless you are that person, you may not disclose its contents or use it in any way and are requested to delete the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc Domain House, 5-7 Singer Street, London EC2A 4BQ Tel: (020) 7608 4900 Fax: (020) 7608 5300 (Registered office: as above; Registered in England and Wales under number: 3727592) Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
On 19.9.2012, at 11.22, Angel L. Mateo wrote:
One of my users has a mailbox named 'INBOX.Kron & SPM' (maybe created a long time ago, when we use courier imap as pop/imap server, but I'm not sure).
I can see the maildir with a doveadm list command:
amateo_adm@myotis31:~$ sudo doveadm mailbox list -u <user> ... INBOX.Kron & SPM ...
but I can't delete it, neithe rename it:
amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron & SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron & SPM: Mailbox doesn't exist: INBOX.Kron &- SPM amateo_adm@myotis31:~$ sudo doveadm mailbox delete -u <user> 'INBOX.Kron \& SPM' doveadm(jrfv): Error: Can't delete mailbox INBOX.Kron \& SPM: Mailbox doesn't exist: INBOX.Kron \&- SPM
is there any way to delete it with doveadm command? should I use a specific syntax or escape to indicate the name?
It's an invalid mailbox name and you can't access it using doveadm. Either rename it with "mv" or via IMAP protocol (not entirely sure if it works via IMAP either).
On 2012-09-19 5:14 AM, Timo Sirainen <tss@iki.fi> wrote:
It's an invalid mailbox name and you can't access it using doveadm. Either rename it with "mv" or via IMAP protocol (not entirely sure if it works via IMAP either).
Just for clarification... it is invalid because of the '&' character? Is there a list of dovecot (or is this simply the IMAP protocol in general?) considers invalid characters in folder names somewhere?
Thanks Timo,
--
Best regards,
Charles
On 19.9.2012, at 13.36, Charles Marcus wrote:
On 2012-09-19 5:14 AM, Timo Sirainen <tss@iki.fi> wrote:
It's an invalid mailbox name and you can't access it using doveadm. Either rename it with "mv" or via IMAP protocol (not entirely sure if it works via IMAP either).
Just for clarification... it is invalid because of the '&' character? Is there a list of dovecot (or is this simply the IMAP protocol in general?) considers invalid characters in folder names somewhere?
mUTF7 uses the & character for encoding non-ASCII data. The & character is encoded in mUTF7 as "&-". Dovecot nowadays uses UTF8 internally for all mailbox names, and it's simply not possible to create from UTF8 string a valid mUTF7 string that contains & alone.
Dovecot has also some additional restrictions on characters (mainly control chars), but they are only enforced when creating new mailboxes. Opening existing mailboxes with control chars is allowed.
On 09/19/2012 02:42 PM, Timo Sirainen wrote:
mUTF7 uses the & character for encoding non-ASCII data. The & character is encoded in mUTF7 as "&-". Dovecot nowadays uses UTF8 internally for all mailbox names, and it's simply not possible to create from UTF8 string a valid mUTF7 string that contains & alone.
I'm confused. I have no problems with creating and using a folder with utf8 name containing '&' character. So, what problem do you describe? doveadm is working with utf8 right? So, why it can't delete such folder. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --------------------------------------------------- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
participants (5)
-
A.L.E.C
-
Alex Crow
-
Angel L. Mateo
-
Charles Marcus
-
Timo Sirainen