[plug] imap & pop3 servers

Tim weirdit at gmail.com
Sun Sep 7 13:11:33 WST 2008


On Fri, Sep 5, 2008 at 1:02 PM, Tim Bowden <tim.bowden at westnet.com.au> wrote:
> I'm setting up a new server that needs to provide simple imap &/or pop3
> for only a few accounts.  Normally I'd just put dovecot on because it's
> easy (apt-get install...) and be done with it, but at some point this
> server will need to serve multiple domains (though only a reasonably
> small number of accounts).  I will require that almost all of those
> users /don't/ have shell accounts.  Should I be looking at something
> else to handle the added complexity (cyrus? others?) or will dovecot
> handle it?

IIRC, Dovecot handles multiple domains with multiple users fine, all
without shell accounts using a variety of backends, including LDAP and
SQL. I have used SQL as a backend before, although I've not played
with the multiple domains thing. From memory, I used postfix as my
MTA, also authenticating off SQL.

To give you some idea of how it works, with large users and multiple
domains, using the filesystem for mailbox's, not a database, you have
a structure similar to as follows.
/var/spool/mail/domain/u/user/
So basically, a folder for each domain, then for large domains, you
have the user folders also sorted, for really large domains for
example, you wouldn't just have the 26 folders A-Z, but maybe AA-ZZ,
so you'd have 676 folders. It all speeds up access time by reducing
the directory index size. Although you mentioned fairly small domains,
so you can get away without having the A-Z folders.

Also, you should work out if you are doing mainly pop or imap. Because
if it's just pop, then go for mbox's, but if also offering imap, I'd
opt for Maildir's. Both work fine with that folder layout.

A word of note. Not everyone has a big /var/ partition, so you may
need to keep that in mind if you are going to put it on that
partition. You can put the maildirs anywhere. For example,
/home/mailhosting/domain/u/users....

I may be able to look around and see if I still have any of the
dovecot and postfix configs around, but a quick google should give you
enough to work with.

Feel free to ask me more questions and I'll do my best to answer them.

Tim
p.s. I prefer dovecot over some other systems, I've found it very easy
to configure, and debug. I've used both exim and postfix and qmail,
and prefer postfix. But then again, they are what I've used most, and
done the most work with, so you may prefer something else that you are
more familiar with.
-- 
Timothy White - Somewhere in Australia



More information about the plug mailing list