Cyrus bug when returning mailbox names
Morgan Sackett
msackett at suckafoo.net
Thu Apr 3 14:18:18 EST 2003
Ian Macdonald wrote:
>Hi,
>
>There seems to be a bug in the Cyrus code that incorrectly returns the
>name of a mailbox with a trailing space as that name without the space:
>
>[ianmacd at baghdad]$ telnet cyrus 143
>Trying 1.2.3.4...
>Connected to cyrus.
>Escape character is '^]'.
>* OK babbage.corp.google.com Cyrus IMAP4 v2.1.12 server ready
>. login tommy password
>. OK User logged in
>. list user.tommy.Agencies *Realty*
>* LIST (\HasNoChildren) "." "user.tommy.Agencies.Bay Area Agencies.Street Media.VIP Realty"
>. OK Completed (0.000 secs 2 calls)
>
>[root at babbage root]# ls -ld /var/spool/imap/user/tommy/Agencies/Bay\ Area\ Agencies/Street\ Media/VIP\ Realty/
>ls: /var/spool/imap/user/tommy/Agencies/Bay Area Agencies/Street Media/VIP Realty/: No such file or directory
>[root at babbage root]# ls -ld /var/spool/imap/user/tommy/Agencies/Bay\ Area\ Agencies/Street\ Media/VIP\ Realty\ /
>drwx------ 2 cyrus root 552 Aug 9 2002 /var/spool/imap/user/tommy/Agencies/Bay Area Agencies/Street Media/VIP Realty /
>
>Is there a simple way to rename this mailbox without the space, so that
>attempts to perform operations on it do not fail? Maybe it's as simple
>as renaming it at the file-system level, as Cyrus seems to think it
>lacks the space, anyway.
>
>Ian
>
>
Try doing some mailbox manipulation.
First, dump the mailboxes.db file to something you can edit:
su - cyrus
cd /var/spool/imap
ctl_mboxlist -d > badmailboxes
Edit badmailboxes to remove the problem name, and move the bad directory
on the filesystem to the new name.
Now load the mailboxes file back to db format:
ctl_mboxlist -u < badmailboxes
ctl_cyrusdb -c
That should fix your problem.
More information about the Info-cyrus
mailing list