[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building an IMAP server



On Mon, Feb 03, 2003 at 10:36:26AM -0800, Dave Carrigan wrote:

> This is incorrect. Cyrus storage method is basically maildir with an
> index database for performance. If the index database gets
> corrupted, it can be completely rebuilt from the messages in the
> mail directory, using the cyrus admin commands.

Well, I've now removed courier-imap and installed cyrus instead, to do
some testing. It works so far that I can send mails to my testuser on
the server, the testuser can read them via IMAP, and he can create and
delete folders. My first impression is that cyrus is considerably
faster than courier.

But to get a decent number of mails into the testusers mailbox for
testing, I'd like to copy over all mail from
~test/Maildir/.debian-users into
/var/spool/cyrus/mail/user/test/example (or another folder,
preferably debian-users). Then, I'd run reconstruct -r user.test
and reconstruct -m, and my test should be able to merely read all
those mails.

Before copying over about 38000 files, I just copied over one single
file from ~test/Maildir/.debian-users/cur to
/var/spool/cyrus/mail/user/test. After that, I've run reconstruct
as above, but the message does *not* appear in the INBOX when viewed
via IMAP. Ok, I renamed the message file to 1. and did reconstruct
again, but it still doesn't appear in the INBOX.

Finally, I removed the cyrus.* files from
/var/spool/cyrus/mail/user/test and did a reconstruct again, but
to no avail. Even worse, the cyrus.* files are not recreated, and the
mailbox has become completely unavailable via IMAP.


Here's some output I get:


little:/var/spool/cyrus/mail/user/test# ls -la
total 32
drwx------    6 cyrus    mail         4096 Feb  4 19:59 .
drwx------    3 cyrus    mail         4096 Feb  4 19:17 ..
-rw-r-----    1 cyrus    mail         4193 Feb  4 19:56 1.
drwx------    2 cyrus    mail         4096 Feb  4 20:23 Drafts
drwx------    2 cyrus    mail         4096 Feb  4 20:23 Sent
drwx------    2 cyrus    mail         4096 Feb  4 20:23 Trash
drwx------    2 cyrus    mail         4096 Feb  4 20:23 example
little:/var/spool/cyrus/mail/user/test# 


cyrus@little:~$ /usr/sbin/reconstruct -r user
user.test.Drafts
user.test.Sent
user.test.Trash
user.test.example
user.test.Drafts
user.test.Sent
user.test.Trash
user.test.example
cyrus@little:~$ /usr/sbin/reconstruct -m     
user.test.Drafts default
user.test.Sent default
user.test.Trash default
user.test.example default
cyrus@little:~$ 


little:/var/spool/cyrus/mail/user/test# ls -la
total 32
drwx------    6 cyrus    mail         4096 Feb  4 19:59 .
drwx------    3 cyrus    mail         4096 Feb  4 19:17 ..
-rw-r-----    1 cyrus    mail         4193 Feb  4 19:56 1.
drwx------    2 cyrus    mail         4096 Feb  4 20:24 Drafts
drwx------    2 cyrus    mail         4096 Feb  4 20:24 Sent
drwx------    2 cyrus    mail         4096 Feb  4 20:24 Trash
drwx------    2 cyrus    mail         4096 Feb  4 20:24 example
little:/var/spool/cyrus/mail/user/test# 


When trying to connect via IMAP, I'm getting the message that the
mailbox doesn't exit. Recovering from crashes/errors doesn't seem to
be so easy. What am I doing wrong here? Are there other programs to
recover from problems?


GH



Reply to: