reconstruct after deleting folders

Phil Ellett sysadmin at technimode.com
Thu Oct 3 20:47:18 EDT 2002


Hi folks,

I am running Cyrus IMAP 2.1.9 and have been having problems with deleted
folders still appearing in the mailbox list.

ctl_mboxlist -d > mailboxes.txt
vi mailboxes.txt and remove entries for deleted folders
ctl_mboxlist -u < mailboxes.txt

If I then repeat

ctl_mboxlist -d > mailboxes.txt

and check the file the removed entries are still there so clear this is not
working.

I suspect that somewhere the command used has changed and is possibly
ctl_cyrusdb or similar now but need some advise.


Regards,

Phil Ellett,
Sheffield.


*** BEGIN PREVIOUS THREAD ***
Kai,

I ran into this problem myself awhile back. The _best_ way to move folders
in this manner is to do it in your imap client program. However, if you
want to do this by hand (say, for a number of users via a script), you can
do the mv command, but you then need to export your mailboxes.db file to a
text file, edit the location of the moved folder and import the mailboxes
back into the mailboxes.db. The error you're getting is because, in
mailboxes.db, there is an entry for the spam folder at the directory level
it used to be at. A reconstruct -rf will find and add the new spam folder
location, but it cannot remove the old mailboxes.db entry or modify it.

As cyrus,

ctl_mboxlist -d > mailboxes.txt
vi mailboxes.txt and edit your old spam entry
ctl_mboxlist -u < mailboxes.txt

HTH,
Will

--On Thursday, 19 September, 2002 22:01 +0200 Kai Groshert
<kai at groshert.de> wrote:

> Hi everybody,
>
> I'm not sure I fully understood the function of "reconstruct", so if
> anyone could give me a hint here...
>
> I'm trying to move one mailfolder for the user "dimitri", which is
> located in /var/spool/imap/user/dimitri:
>
> -rw-------    1 cyrus    mail            4 Sep 19 22:47 cyrus.cache
> -rw-------    1 cyrus    mail          181 Sep 19 22:47 cyrus.header
> -rw-------    1 cyrus    mail           56 Sep 19 22:47 cyrus.index
> drwx------    2 cyrus    root          117 Sep 19 22:47 drafts
> drwx------    2 cyrus    root          117 Sep 19 22:47 sent-mail
> drwx------    2 cyrus    root          117 Sep 19 22:46 spam
> drwx------    2 cyrus    root          117 Sep 19 22:51 trash
>
> I'm trying to move the "spam" folder below the "trash" folder (using
> "mv"). After this I obviously need something like reconstruct, but it
> gives me this:
>
> cyrus at centauri:~ > reconstruct -r user.dimitri
> user.dimitri
> user.dimitri.drafts
> user.dimitri.sent-mail
> user.dimitri.spam: System I/O error No such file or directory
> user.dimitri.trash
>
>
> So I thought, well, the "-f" option looks promising, but wait:
>
> cyrus at centauri:~ > reconstruct -rf user.dimitri
> user.dimitri
> user.dimitri.drafts
> user.dimitri.sent-mail
> user.dimitri.spam: System I/O error No such file or directory
> discovered user.dimitri.trash.spam
> user.dimitri.trash: Mailbox does not exist
> user.dimitri.trash.spam
>
>
> So it found the moved mailbox, but it didn't remove the missing one.
> Using "reconstruct -m" doesn't work either: "reconstructing mailboxes.db
> currently not supported".
>
> I'm not sure if the quota command should help, but I get some error too:
>
> cyrus at centauri:~ > quota -f
> __db_assert: "0" failed: file "../dist/../db/db_cam.c", line 86
> Aborted
>
>
> Still, if I run it on a single mailbox (not the modified one), it works:
>
> cyrus at centauri:~ > quota -f user.christin
>    Quota  % Used    Used Root
>   250000       0       2 user.christin
>
>
>
> Does anybody know what I'm doing wrong? Is there any way to make imapd
> aware of removed folders?
>
> Any hint would be greatly appreciated. I'm quite confused.
>
> I'm using cyrus-imapd 2.0.16.
>
>
> Regards,
> Kai
>
>
>
>






More information about the Info-cyrus mailing list