mboxlist differenece 2.1 vs 2.3 ?

Kristaps Armanis krisha.lists at grafton.lv
Tue Mar 13 09:36:26 EST 2007


Hello myself! :)

Tuesday, March 13, 2007, 9:10:36 AM, I wrote:
KA> Migrating here from Cyrus imap 2.1  to 2.3.
KA> ctl_mboxlist -d  output differs.
KA> In old Cyrus 2.1:
KA> user.krisha     1       krisha  lrswipcda
KA> user.krisha.sent-mail    1       krisha  lrswipcda
KA> user.krisha.trash       1       krisha  lrswipcda
KA> In new Cyrus 2.3:
KA> user.krisha    0 1     krisha lrswipkxtecda
KA> user.krisha.sent-mail  0 1     krisha lrswipkxtecda
KA> user.krisha.trash      0 1     krisha lrswipkxtecda
KA> Could someone please explain difference? And/or how should I
KA> convert this dump to suit new 2.3 version?

Found this @ctl_mboxlist  manpage:
 -d     Dump  the  contents of the database to standard output in a portable flat-text format.  NOTE: In
        Cyrus versions 2.2.13 and earlier, the dump format did  not  include  the  mailbox  type  flags,
        breaking remote mailboxes (frontends, mupdate master, unified backends) when undumped.
 -u     Load the contents of the database from standard input.  The input MUST be in the  format  output
        using  the -d option.  NOTE: Both the old and new formats can be loaded, but the old format will
        break remote mailboxes.

We have no remote mailboxes. Should we use the old format
for restoring?
We converted to "looks like new" format using this php
script:

<?php
$tmp=file_get_contents('MXBOXLIST.old');
$tmp=explode("\n",$tmp);
$i=count($tmp);
for($n=0;$n<$i;$n++){
 $line=$tmp[$n];
 $e=explode("\t",$line);
 $new_line=$e[0]."\t0 ".($e[1]!='default'?$e[1]:1)."\t".$e[2]."\t".'lrswipkxtecda'."\t";
 $str.=$new_line."\n";
}
$f=fopen('MXBOXLIST.new','w');
fwrite($f,$str);
fclose($f);
?>

But:
$ ctl_mboxlist -u < MXBOXLIST.new
ctl_mboxlist: cyrusdb_skiplist.c:1093: mystore: Assertion `key && keylen' failed.
Aborted

Any hints?
Thank you!
--
krisha



More information about the Info-cyrus mailing list