PB with mailboxes.db magic number

Simon Matter simon.matter at ch.sauter-bc.com
Fri Jan 16 14:05:15 EST 2004


> Hi,
>
> We have problems with mailboxes.db :
>
> In a initial configuration, all works fine.
>
> After a database corruption, we have rebuilt mailboxes.db with the method
> described in the "cyrus-imapd-README.HOWTO-recover-mailboxes.db" file
> (which
> is inclued in the cyrus-imapd RPM).
> Now "/etc/init.d/cyrus-imapd restart" is blocked after "converting db
> files... ". We have found that the problem is located in
> "/usr/libexec/cyrus/cvt_cyrusdb_all", when it does a :
>
> file -b -m /usr/share/magic:/usr/share/cyrus-imapd/rpm/magic
> /var/lib/imap/mailboxes.db
> with the following error :
> file: invalid type 0 in mconvert().
>
> In fact, "file" uses /usr/share/cyrus-imapd/rpm/magic.mgc file. If we

I'm wondering whether your file /usr/share/cyrus-imapd/rpm/magic.mgc
belongs to the rpm package. Can you check this with rpm -qf
/usr/share/cyrus-imapd/rpm/magic.mgc?

> remove
> the magic.mgc file, and rerun the command, we get :
>
> file -b -m /usr/share/magic:/usr/share/cyrus-imapd/rpm/magic
> /var/lib/imap/mailboxes.db
> file: Using regular magic file `/usr/share/cyrus-imapd/rpm/magic'
> Cyrus skiplist DB
>
> In fact, if we recompile the magic file to create a new magic.mgc, it's
> different with the old one :
> cp /usr/share/cyrus-imapd/rpm/magic.mgc /tmp
> cd /tmp
> file -C -m magic
> cmp magic.mgc /usr/share/cyrus-imapd/rpm/magic.mgc
> magic.mgc /usr/share/cyrus-imapd/rpm/magic.mgc differ: byte 109, line 1
>
> Now, with the new magic.mgc, no more problem :
> file -b -m magic /var/lib/imap/mailboxes.db
> Cyrus skiplist DB
>
> So the questions :
> 1) Why the default magic.mgc is different from the new one ?
> 2) If the default magic.mgc is bad, why there wasn't any problem before
> the
> database corruption ?
> 3) Is it a mailboxes.db rebuild problem ? (But the newly rebuilt database
> works very fine)
>
> The default magic.mgc is not altered since installation, as magic and
> magic.mgc have the same date:
> # ls -l /usr/share/cyrus-imapd/rpm
> -rw-r--r--    1 root     root          338 jan 29  2003 magic
> -rw-r--r--    1 root     root          216 jan 29  2003 magic.mgc
>
> Thanks in advance.
>
> PS: our configuration is
> cyrus-sasl-md5-2.1.10-1
> cyrus-sasl-2.1.10-1
> cyrus-sasl-devel-2.1.10-1
> cyrus-imapd-2.1.11-6
> cyrus-imapd-utils-2.1.11-6

Okay, you didn't tell us which RedHat version you are using but your cyrus
packages are quite old. There was a problem with an updated file version
which may in this case affect you. I strongly recommend you to upgrade to
the current releases of the rpms. Most likely the problem doesn't exist
there.

Simon

>
> # uname -a
> Linux myhost 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
> GNU/Linux
>
> --
> M. Zixiong WANG,
> z.wang at sysium.com
>
>






More information about the Info-cyrus mailing list