mailboxes.db invalid entries
brong at fastmail.fm
Sat Apr 23 21:27:42 EDT 2016
The tool is safe to use with Cyrus running
Of course if you delete a mailboxes db entry without deleting the underlying files and then recreate the folder, things can get confused because there are already files on disk...
On Sat, Apr 23, 2016, at 06:58, Jan Kowalsky via Info-cyrus wrote:
> Hi all,
> Am 22.04.2016 um 22:28 schrieb Jan Kowalsky:
> > Hi Wolfgang,
> > thanks for your answer.
> > Am 22.04.2016 um 11:06 schrieb Wolfgang Breyha:
> >> Jan Kowalsky via Info-cyrus wrote on 22/04/16 01:28:
> >>> First I tried to dump the mailbox.db with ctl_mboxlist -d /tmp/mailboxes.txt
> >>> After deleting the wrong entry manually I wanted to reload the mailbox
> >>> again with ctl_mboxlist -u /tmp/mailboxes.txt. All operation with
> >>> stopped cyrus.
> >> Have you renamed your mailboxes.db after using -d and before using -u?
> >> Otherwise ctl_mboxlist will import your dump into the existing mailboxes.db.
> >> And are this exactly the commands you used?
> > Yes. But I'll give this a try:
> >> I think
> >> ctl_mboxlist -d >/tmp/mailboxes.txt
> >> and
> >> ctl_mboxlist -f /tmp/mailboxes.db.new -u </tmp/mailboxes.txt
> >> should be used since both read/write to STDIN/OUT.
> > unfortunately with the same result:
> > root at mail:~/cyrus-debug# /usr/lib/cyrus-imapd/ctl_mboxlist -d >
> > /tmp/mboxlist.txt
> > root at mail:~/cyrus-debug# vi /tmp/mboxlist.txt
> > root at mail:~/cyrus-debug# /usr/lib/cyrus-imapd/ctl_mboxlist -f
> > /tmp/mailboxes.db.new -u < /tmp/mboxlist.txt
> > fatal error: failed to mmap /tmp/mailboxes.db.new.NEW file
> > root at mail:~/cyrus-debug# ls -l /tmp/mailboxes.db.new*
> > -rw------- 1 cyrus mail 2219712 Apr 22 22:06 /tmp/mailboxes.db.new
> > -rw------- 1 cyrus mail 11400 Apr 22 22:06 /tmp/mailboxes.db.new.NEW
> > I found the cyr_dbtool command.
> > Is the "cyr_dbtool delete key" maybe meant for this too?
> well, this worked:
> /usr/lib/cyrus-imapd/cyr_dbtool /srv/imap/config/mailboxes.db skiplist
> delete example.com\!user.kontakt.Calendar
> good to know. I did it with stopped Cyrus. Anybody know if this tool is
> also intended to use it while cyrus is running?
> Regards Jan
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
brong at fastmail.fm
More information about the Info-cyrus