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

Re: Upgrade a mail server

On Thu, Feb 14, 2002 at 10:22:08PM +1100, Russell Coker wrote:
> On Thu, 14 Feb 2002 20:33, Javier Castillo Alcibar wrote:
> > I have a debian 2.1 email server, with sendmail as smtp server, and
> > qpopper as POP3 server. This box hosts several domains (about 100
> > different domains, using virtual hosting), with a total of 1300
> > users. Because the auth method is based on /etc/passwd, I have 1300
> > unix user accounts, one per mailbox, of course.
> >
> > This is becomming not scalable, and I want to start to use a mail
> > server with auth based on sql, using MySQL for example. I am
> > thinking in use a debian woody( I'll wait till woody becomes
> > stable), with sendmail as smtp server, but I am not sure about the
> > pop3 daemon I have to use.
> /etc/passwd should scale to 1300 users, using nscd should solve any
> problems there.  But chances are that changing how you look up user
> names won't make any noticable difference in performance.

yes, /etc/passwd scales up to several thousand accounts - at least 5000
or 10000 depending on how good your hardware is.  you don't need nscd,
just hashed map files for /etc/{passwd,group,shadow).  there's a
Makefile in /var/lib/misc which handles that.

if you need to scale beyond that then use LDAP rather than mysql for
account info.

and dump sendmail.  it's performance is lousy.  use a decent mailer like
postfix (converting from sendmail to postfix is very easy as postfix is
backwards compatible with all but the most obscurely weird sendmail

alternatively, use the decent-but-nonfree mailer qmail...but it won't be
a smooth upgrade, you'd have to throw away everything you ever learned
about running an MTA and redo your entire mail system from scratch.

> The best way of killing performance on a POP server is using
> /var/spool/mail.  Use Maildir storage and you'll get huge performance
> gains.
> I am guessing that you use /var/spool/mail as I can't imagine any
> other way of getting performance problems with only 1300 users.

absolutely true.

POP/IMAP on /var/spool/mail mailboxes is the thing that really kills
performance on one of my mail servers (~6000 accounts in /etc/passwd).
this is especially true for those accounts which have 10s of megabytes
in their mailbox.

i'd love to convert it over to Maildir/ but haven't yet found any way
that doesn't involve many hours of downtime while converting the
mailboxes from mbox format to Maildir.

one of these days i'll have the time to sit down and work out a good
solution to the problem.  i've got some ideas but no time to work them


craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch

Reply to: