Plain text dump of cyrus.index?

Bron Gondwana brong at
Tue Apr 3 03:16:11 EDT 2007

On Sun, Apr 01, 2007 at 07:30:11PM -0400, Miller, Greg wrote:
> Hello,
> I found myself in a the situation where I need to do the opposite of a
> reconstruct on my mailboxes. That is, instead of rebuilding the cyrus.*
> files to reflect the messages on the file system, I want to query the
> cyrus.* files to see which message files are indexed, and then delete
> any extraneous message files on the file system.
> My first step is to find a utility that can dump cyrus.index so that I
> can determine which message file are valid, and therefore should not be
> deleted.

This isn't a utility as such, but still:


require '';

my $path = shift;

my $index = Cyrus::IndexFile->new_file($path);

while (my $record = $index->next_record()) {
  print "$record->{Uid}\n";

I've written enough little tools to unpack parts of the index file
that I got sick of it and just wrote something that can pack and
unpack the whole thing!  Yay for evil little perl utilities.  It's
not safe against index file format changes, but it's quite extensible
in that case, just add some more formats to the start of the file :)

-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-perl
Size: 6159 bytes
Desc: not available
Url :

More information about the Info-cyrus mailing list