Re: corrupted mailboxes.db

Deniss <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hello,

in case anybody interested, I managed to fix mailboxes.db by this 
technic (I have no shared folders, groups, complex permissions etc)

1. create plain dump file:
  cyr_dbtool /mailboxes.db twoskip show | perl -n -e 'if ( 
~/^([^\t]+)\t%\(A %\(([^\s]+) ([^\)]+)/ ) { print "$1\t0 default 
$2\t$3\t\n"; }' | sort -u >mailboxes.dump
2. import:
  ctl_mboxlist -u <mailboxes.dump

Looks simple, works well

Best,
Deniss

On 20.10.2017 17:52, Deniss wrote:
> Hello,
>
> I run cyrus imap 2.5.11.
> Somehow mailboxes.db become corrupted.
> running `ctl_mboxlist -d` leads to segfault, backtrace below.
>
> How can I recover mailboxes.db ?
>
> Backtrace
> #0  0x0000007d43e12952 in printf (__fmt=0x7d43e143c2 "%s\t%d %s %s\n")
> at /usr/include/bits/stdio2.h:104
> #1  dump_cb (rockp=rockp@entry=0x384c65d6e90, key=<optimized out>,
> keylen=<optimized out>,
>      data=data@entry=0x23d2177d3d5 <error: Cannot access memory at
> address 0x23d2177d3d5>, datalen=datalen@entry=61) at
> imap/ctl_mboxlist.c:182
> #2  0x0000023d432db22a in myforeach (db=0x7d444012d0,
> prefix=0x7d43e144ec "", prefixlen=0, goodp=0x0, cb=0x7d43e12890
> <dump_cb>, rock=0x384c65d6e90,
>      tidptr=<optimized out>) at lib/cyrusdb_twoskip.c:1567
> #3  0x0000023d4363bea7 in mboxlist_allmbox (prefix=<optimized out>,
> proc=0x7d43e12890 <dump_cb>, rock=0x384c65d6e90, incdel=1) at
> imap/mboxlist.c:2326
> #4  0x0000007d43e12e87 in do_dump (op=DUMP, part=0x0, purge=0) at
> imap/ctl_mboxlist.c:458
> #5  0x0000007d43e12548 in main (argc=4, argv=0x384c65d9058) at
> imap/ctl_mboxlist.c:1029
>
>
> Best, Deniss
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.