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

Re: Mail servers for large numbers of users



On Sun, 12 Dec 1999, Ronald Tin wrote:
> On Sat, Dec 11, 1999 at 05:07:53PM -0200, Henrique M Holschuh wrote:
> > I've seen setups like these being mentioned in the Postfix ML (more than one
> > person there claimed more than 100000 users under Cyrus IMAPD+Postfix).
> 
> Sorry if this question looks dumb...

No, it's not dumb. But you could have found the answer by going through the
Cyrus WWW site ;-)

> How could I deliver mails to accounts that don't really
> exist? (I can't allocate 100000 uids on a single machine, right?)

You deliver them to a database of some sort. All the 'mail user account'
concept is kept by your program. As far as the OS is concerned, these users
do not exist. Accounts, bookeeping and permissions are all managed by the
program.

For Cyrus, this means you have to call its special 'delivery agent' to store
the mail to the users 'mailbox', and also that the only way to access this
email is through the pop3 and imap components of Cyrus.

You'll probably need LDAP to keep the user's information, but that's
something you'll need to read the Cyrus docs to find out for sure.

> I have only read the FAQ and anatomy for postfix....
> Shall I play with the "mailbox transport" option for
> local delivery, or do I create local users with same uid
> (and disable their login) ? Do the 2nd solution really work?

I have not tried this with postfix, but it should be simple enough: read all
the docs (this ought to be a faq, I think). I recall you need to uncomment
the transport option which says 'cyrus'. This makes postfix use the 'cyrus'
line in master.cf as the transport, and I believe that in Debian, this line
is already there.

You'll need to do more than that to get it to work fine, though. For one,
you _will_ have to fine-tune master.cf, as the default cannot handle a very
busy system. You'll need to limit the max number of incoming smtpd
processes, as well as the number of outgoing smtp processes, etc. to avoid
swapping. Lots and lots of RAM will help :-)

> But still it doesn't seem very efficient to store 100000 files
> in a single mail spool directory?

I don't think Cyrus keeps this in a single mail spool directory, probably it
uses database backends.

You *will* need decent IO for this many email users in a single machine, as
well as lots of disk space and a lot of RAM. This much I'm sure.

> > > The MTA won't give you any problems - they typically don't care about the
> > > password database.  However, here's another reason why you don't want to
> 
> But the MTA have to lookup the local user from the password
> database.. and mails are stored under owner's uid.
> That's the case for sendmail and exim at least.

I believe exim can be configured to look up the users somewhere else. As for
postfix, I *think* you will have to add all users to a database (db, dbm or
a text file which is hashed by the 'postmap' program included with postfix,
and I believe LDAP is possible as well with a patch) and tell it to use
that.

I'm really only repeating whatever I can remember from lurking at the
postfix ml. Go after their archives, and you will find quite a lot of
threads about this.

-- 
  "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: