Re: reconstructing mailboxes


Subject: Re: reconstructing mailboxes
From: Christian Schulte (cs at schulte dot it)
Date: Wed Apr 30 2003 - 16:11:47 EDT


Henry Umansky wrote:

> Thank you for your help, however I still can't seem to get it to work.
> Below I listed a bit more information you asked for (everything with
> the "sh-2.04$" prompt is with user cyrus):
>
> Cyrus version:
> [root@herosoftware /root]# rpm -qa | grep cyrus
> cyrus-sasl-1.5.24-22.7
> cyrus-sasl-devel-1.5.24-22.7
> cyrus-sasl-gssapi-1.5.24-22.7
>
> and imap.conf has:
> [root@herosoftware /root]# cat /etc/imapd.conf
> configdirectory: /var/imap
> partition-default: /var/spool/imap
> admins: cyrus
> srvtab: /var/imap/srvtab
> allowanonymouslogin: no
> tls_ca_file: /var/imap/server.pem
> tls_cert_file: /var/imap/server.pem
> tls_key_file: /var/imap/server.pem
>
> no matter what user I put in there it still gives me an error:
>
> sh-2.04$ ./reconstruct user/henry at herosoftware dot com
> user/henry at herosoftware dot com: Mailbox does not exist

Should not work with your configuration!
There is something I should have mentioned before. There are certain
imapd.conf options which change the external representation of
mailboxes. How they are called and if they exist in your configuration
depends on your cyrus-version. If this is your complete imapd.conf file
you do not seem to use any of these extensions and so the only valid
mailbox representation on your system should be "user.username". Or do
you have unixhierarchysep and/or virtdomains options set also ? If not:
What happens if you reconstruct the whole mailboxtree by simply issueing
reconstruct without any options as the cyrus user ? What do the logs say
if you do that ? (....maybe this only works for cyrus-2.2, I do not
know;-)...)....

>
>
> sh-2.04$ ./reconstruct user dot henry at herosoftware dot com
> user dot henry at herosoftware dot com: Mailbox does not exist
>
> sh-2.04$ ./reconstruct user.henry
> user.henry: Mailbox does not exist

And that should have worked!

> Here's what syslog says:
>
> sh-2.04$ ./ctl_mboxlist -d
> fatal error: can't read mailboxes file
> sh-2.04$ tail /var/adm/imapd.log
> Apr 30 13:00:38 herosoftware ctl_mboxlist[28274]: DBERROR db3:
> /var/imap/mailboxes.db: unexpected file type or format

As the cyrus user: Can you do ctl_mboxlist -d without an error in the
logs ? If not I think your mailboxes.db file is corrupted somehow. I do
not know how to rebuild it correctly! Mainly one runs a daily cronjob
which does a ctl_mboxlist -d > mailboxes.bak so that if the mailboxes.db
gets corrupted one can restore it by ctl_mboxlist -u < mailboxes.bak !
Do you have a recent backup-dump of mailboxes.db (...I think there are
some RPMs around which install such a cronjob automatically...) ? Does
your cyrus-version support ctl_mboxlist -d/-u ? Do you have different
cyrus-versions installed and maybe you are running the wrong reconstruct
binary from the wrong version ? Or maybe did you do a berkeley-db
upgrade in any ways so that maybe the reconstruct binary is linked
against db-3 and your mailboxes.db file is from a db-4 installation ? If
you only get this error in the logs by issueing reconstuct and all other
services (imap,pop,lmtp) work correctly it maybe a wrong
reconctruct-version however ! If your mailboxes.db file is corrupted
your whole installation should not work and not just reconstruct, I
think! And of course you should find more answers if posting to the
info-cyrus list and not to cyrus-sasl because this all here more relates
to cyrus-imapd than to sasl however...

...

To join the mailing list for the Cyrus IMAP, send mail to
majordomo at lists dot andrew dot cmu dot edu <mailto:majordomo at lists dot andrew dot cmu dot edu>
with a body of: subscribe info-cyrus
A complete archive is available via anonymous IMAP to
cyrus.andrew.cmu.edu <imap://cyrus.andrew.cmu.edu/archive.info-cyrus>. A
web archive is available at http://asg.web.cmu.edu/bb/archive.info-cyrus.

...
 
--Christian--







Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD