Well, you need to install a mail transfer agent (MTA) and a POP server. However, IMAP is better than POP, so I'd consider using IMAP. If you have a lot of users POP is going to eat up a ton more bandwidth. From the user's perspective POP pretty much sucks. POP ties you to one computer, IMAP allows you to see your email from anywhere. (This is oversimplified, there are exceptions, etc..) If you run POP be prepared to have this conversation quite often:
user:"A bunch of my mail disappeared! This is terrible and you must fix it!!!"
you:"Did you check your email on a different computer than usual?"
user:"Yes."
Well, the messages were all downloaded to that computer and deleted from your server.
MTAs are things like sendmail and postfix. Postfix is easy to set up. You'd just configure it to accept mail for all fifty domains. Pretty simple. It is also your SMTP server, so when users send mail they connect to port 25 on your box.
IMAP servers are programs like cyrus, courier-imap, and others. I've never set one up.
I don't know any POP servers, but I'm sure google will provide.
You might need to also use procmail, which is used to filter and sort mail.
You'll probably also want to run something like Spamassassin, which works with procmail.
Here's a five part series on setting up a mailsystem. It's IMAP, and its for a home user, and he uses his ISP email account to collect mail, but it is still useful for the basic concepts. Collecting your own mail is trivial, your MTA does it for all domains tell it about.
http://hotwired.lycos.com/webmonkey/...tml?tw=backend
Here's another five part series on integrating spamassassin into your mailserver. You want this:
http://hotwired.lycos.com/webmonkey/...tml?tw=backend
Mailsystems are very modular; lots of little programs that do specified tasks. I run a mailserver just for the people in my house. We don't need POP or IMAP service (because we either check email at home or use SSH on the road). Anyway, my mailserver works like this:
Fetchmail (fetches mail from IMAP accounts at ISP and gives it to Postfix)
Postfix (accepts mail from fetchmail, accepts mail sent directly to our server, sends mail)
Procmail (accepts incoming mail from Postfix and gives it to Spamassassin)
Spamassassin (filters spam then gives mail back to procmail for final delivery)
So it works like: incoming mail->fetchmail->postfix->procmail->spamassassin->procmail->inboxes
For you it'd be like:
incoming mail -> postfix -> procmail ->spamassassin ->procmail -> inboxes
And postfix would accept SMTP connections from your users and send their mail
And some IMAP or POP server would accept connections from your users to let them view their inboxes.