mailboxes.db vs ctl_mboxlist -d

bawood bawood at umich.edu
Mon Aug 25 16:38:35 EDT 2008


Apologies for missing this topic when it came up originally.  It seems 
like having all the fields tab separated in a text dump is a good reason.  
When you are trying to pull data out of a text file using unix tools it 
is significantly easier if the fields are all tab delimited, rather than 
tabs and spaces intermixed.  We have several scripts that use the text 
dump of the database to gather data and generate various reports, which 
all broke after updating to 2.3.12.  

Brian

On Tue, 04 Sep 2007, Ken Murchison wrote :
>Probably no good reason. I would gladly accept a patch to fix this, if
>the undump code can be rewritten to accept either dump format.
>
>
>David Carter wrote:
>
>    Is there a reason why "ctl_mboxlist -d" generates output of the
>form?:
>
>      user.dpc99\t0 default\tdpc99\tlrswipcda\t
>                           ^^
>                           tab here
>
>    The actual values in mailboxes.db are stored as:
>
>        Key: user.dpc99
>      Value: 0 default dpc99\tlrswipcda\t
>                      ^
>                      space here
>
>
>    Consequently "cyr_dbtool /var/imap/mailboxes.db set < file" expects
>input lines of the form:
>
>     user.dpc99\t0 default dpc99\tlrswipcda\t
>                          ^
>                          space here
>
>
>    I just spent a rather puzzled half hour playing with cyr_dbtool,
>wondering why utilities were started to segfault and abort() in amusing
>ways.
>
>    Entirely my own fault, but it does demonstrate the danger of using
>tabs and spaces inconsistently. I think that cyr_dbtool is correct and
>ctl_mboxlist is in the wrong here. 


More information about the Cyrus-devel mailing list