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

Re: Building an IMAP server



On Tue, 04 Feb 2003, Hans Wilmer wrote:
> delete folders. My first impression is that cyrus is considerably
> faster than courier.

It is.  The whole indexes pain with Cyrus is to get that speed...

> But to get a decent number of mails into the testusers mailbox for
> testing, I'd like to copy over all mail from
[...]

Don't.  It will hurt you like all hell.  Instead, clean up the mess
(cyrus-makedirs will help you there), and upload all the mail to the imap
folder using a mail client.

This is trivial to do with mutt, for example.  Open the maildir folder, tag
all messages with "T.<CR>", upload them all with ";s{myid@imapserver}<CR>".

Cyrus is really, really picky about what it stores in its bowels, and thus
you are well advised not to do anything to the spool that isn't done through
either IMAP, LMTP, or any of the cyrus utilities (cyrreconstruct, cyrquota,
cyrdeliver...).

BTW, Cyrus can be even faster by creating SQUAT indexes of mailboxes to
speed up the "search" operations...

> 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?

When you copied the files directly, without knowing how sane they were, you
probably got Cyrus confused.  There must be no "From " line, just a RFC822
message with proper EOLs (I don't quite remember what cyrus uses for an EOL
right now, probaby 0x0A) and no trailing garbage or embedded NULLs, EVER.

As long as the mailbox is still in the mailbox databases (see ctl_mboxlist),
a cyrreconstruct should rebuild the indexes.  But it REALLY won't like any
message files that are even slightly out of wack.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: