Removing a mailbox with a very long name

Michael Menge michael.menge at zdv.uni-tuebingen.de
Wed Nov 24 10:13:11 EST 2010


Hi,

Quoting David Mayo <D.J.Mayo at bath.ac.uk>:

>
> Can someone suggest the best way of deleting a mailbox that has gotten
> too long?
>
> This one is stopping our daily "quota fix" command from running:
>
> Nov 24 06:40:07 imap.bath.ac.uk quota[12707]: [ID 240394 mail.error]
> IOERROR: opening quota file
> /opt/etc/imapd/quota/a/user.abc20.INBOX.INBOX.INBOX.INBOX.INBOX.toINBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.Deleted
> Messages: File name too long
> Nov 24 06:40:07 imap.bath.ac.uk quota[12707]: [ID 335833 mail.error]
> DBERROR: error fetching
> user.abc20.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.Deleted
> Messages: cyrusdb error
> Nov 24 06:40:07 imap.bath.ac.uk quota[12707]: [ID 857756 mail.notice]
> skiplist: unlock while not locked
> Nov 24 06:40:07 imap.bath.ac.uk quota[12707]: [ID 809228 mail.error]
> failed building quota list for '*': System I/O error: Bad file number
>
> I have managed to delete all the parent folders, but not this one.
>
> cyradm won't even let me enter a mailbox name this long, but I can use a
> "*" which LISTs and DELETEs all the mailboxes apart from this one.
>
> cyradm output:
>
> imap.bath.ac.uk> dm "user.abc20.INBOX.*"
> Deleting mailbox
> user.abc20.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.Deleted
> Messages...Invalid mailbox name
>
> And IMAP telemetry log:
>
> <1290605708<9 RLIST "" "user.abc20.INBOX.*"
>  >1290605708>* LIST (\HasNoChildren) "."
> "user.abc20.INBOX.INBOX.INBOX.INBOX.INBO
> X.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.
> INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.IN
> BOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBO
> X.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.
> INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.IN
> BOX.INBOX.INBOX.INBOX.Deleted Messages"
> 9 OK Completed (0.000 secs 2 calls)
> <1290605708<10 DELETE
> "user.abc20.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBO
> X.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.
> INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.IN
> BOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBO
> X.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.
> INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.INBOX.IN
> BOX.Deleted Messages"
>  >1290605708>10 NO Invalid mailbox name
>
> My "cyrus" user has "create" permissions on the mailbox, so it's not an
> ACL issue.
>
> I have removed the mailbox from the filesystem and run a reconstruct,
> but this (predictably) just recreates the folder on the filesystem.
>
> We're running Cyrus 2.3.13.
>

Do you use delete_mode: delayed ?
this will rename the folder to $DELETEPREFIX.$OLDNAME.$TIMESTAMP
which would result in a longer Name.

You can try to rename it to a shorter name and
deleting the renamed folder?

An other ideas is to remove the mailboxname from the mailbox.db and
deleting it on the filesystem.

Use on your own risk
cyr_dbtool $configdirectory/mailboxes.db skiplist delete  
user.abc20.INBOX......

Regards

--------------------------------------------------------------------------------
M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
michael.menge at zdv.uni-tuebingen.de
Wächterstraße 76
72074 Tübingen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5267 bytes
Desc: S/MIME Signatur
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20101124/23953abf/attachment-0001.bin 


More information about the Info-cyrus mailing list