A junior administrator of mine mistakenly created a mailbox with an empty name, by typing into cyradm the commands: createmailbox user/$lb setquota user/$lb 10000 He will of course shortly receive an extra lesson on shell variables, but meanwhile I find myself confronted with the problem how to get rid of the mailbox he created. So far all attempts have failed: [cyrus at posthamster ~]$ /usr/lib/cyrus-imapd/quota Quota % Used Used Root 0 user/ 0 user/ 10000 [...] [cyrus at posthamster ~]$ ls -l /var/spool/imap/user/ total 2180 drwx------. 2 cyrus mail 4096 Oct 1 2012 drwx------. 2 cyrus mail 4096 May 7 08:53 10000 [...] [cyrus at posthamster ~]$ cyradm -u cyrus localhost IMAP Password: localhost> sq user/$lb localhost> dm user/$lb deletemailbox: Permission denied localhost> lam user/$lb "" lrswipkxtecda localhost> sam user/$lb cyrus all usage: setaclmailbox mailbox id rights [id rights ...] localhost> sam user/"" cyrus all setaclmailbox: cyrus: lrswipkxtea: Mailbox does not exist localhost> sam user/ cyrus all setaclmailbox: cyrus: lrswipkxtea: Mailbox does not exist localhost> lam user/ Mailbox does not exist localhost> lam user/"" Mailbox does not exist localhost> ^D [cyrus at posthamster ~]$ ls -l /var/spool/imap/user/ total 2180 drwx------. 2 cyrus mail 4096 Oct 1 2012 drwx------. 2 cyrus mail 4096 May 7 08:53 10000 [...] Obviously the handling of undefined variable substitution in cyradm is somewhat inconsistent, preventing me from deleting the mailbox the same way it was created. Any ideas? TIA T. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20130507/5870a31b/attachment-0002.sig>
Thanks, I found the solution. The name of the bad mailbox wasn't in fact empty, but a single blank character which the cyradm and quota commands dutifully removed as "leading blank" in their output. So localhost> sam "user/ " cyrus all localhost> dm "user/ " was what it took to get rid of the mailbox with the "empty" name, and localhost> sam "user/ 10000" cyrus all localhost> dm "user/ 10000" took care of the second one created by the hapless colleague's setquota command. Am 07.05.2013 21:04, schrieb Tilman Schmidt:> A junior administrator of mine mistakenly created a mailbox > with an empty name, by typing into cyradm the commands: > > createmailbox user/$lb > setquota user/$lb 10000[...] -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20130507/c053e158/attachment-0002.sig>