Re: [Exim] Advise on pop3 and imap servers`

Góra strony
Delete this message
Reply to this message
Autor: Avleen Vig
Data:  
Dla: Terry Shows
CC: exim-users
Temat: Re: [Exim] Advise on pop3 and imap servers`
On Mon, Jun 23, 2003 at 10:55:12PM -0500, Terry Shows wrote:
> Okay, I have exim working and pop3 working (using vm-pop3).
> Does anyone have an imap solution that will allow me to use virtual domains?


Terry,

Sorry for missing your original message. I would have replied to that
and recommend you check out the project I run: Virtual Exim, at:
http://www.silverwraith.com/vexim

This project *IS* under active development, and I provide support for it
as much as I possibley can. I'm willing to make and changes and
implement any features taht are request (of course, they have to be at
least slightly reasonable ;)

VExim uses mysql to store almost all of it's data (the only obvious
thing it does not store, is the list of local domains - these still need
to be added to Exim's configure file).

You can store the mail in any format you prefer. In the example config
file I provide, I use Maildir. For this reason I recommend installing
Courier-Imap. Courier-Imap comes with both a pop3 and an imap daemon.
Both work simply and effectively, and can read authentication data from
a MySQL backend.

The hype about Maildir is thus:
Traditionally on Unix machines, mail is stored in mbox format and all
messages for a "mail folder" were kept in a single file. File could grow
rather large. When a mail client or MTA needs to write to the file, it
first locks it, writes to it, then unlocks it. This prevents any other
processes delivering to the mailbox, or preforming any other mailbox
functions. This caused particular problems over NFS where NFS file
locking would delay the whole process of locking and unlocking. Stale
locks and such also came into play.

So, someone decided to come up with the Maildir format (was it DJB? I
think so, but I don't recall exactly). Here, each "mail folder" has it's
own directory on the filesystem. Each message in the folder is it's own
file, inside the filesystem directory. This avoids almost completely,
the locking issues previously discussed.

In my experience, Maildir is *slightly* slower than mbox on slow
computers (eg, my P233). On faster computers, it's less noticable.
As the number of messages in the maildir goes up, performance generally
goes down. And this makes some amount of sense: For each message, the
mail client (or POP server, or IMAP server), has to open the file, read
the headers, close the file, and then open the next file. All these
opens and closes can get expensive. Conversely, with mbox format files,
the mail client (or POP server, or IMAP server) have to open a single,
and sometimes very large, file. Then they read the first set of headers,
seek to the next message, read more headers, etc.
This is less expensive, but incurrs the wrath of locking.

I don't know if locking takes place on mbox files when a POP or IMAP
server is trying to read the file to deliver messages to the remote
client, but it might. Thinking about it, it probably does. This can
cause problems if a mailbox both gets many mails, and is also polled
frequently.

I use Maildir, because I don't like locking issues. I like to be able to
see each individual message on the filesystem, and I don't mind the
slight performance hit. It's small enough for me to be able to ignore. I
also like courier-imap a lot as a way or allowing my users to get their
mail, so that works well too :-)