Slashdot Mirror


Ask Slashdot: Building a Large Email Service

Rewd asks: "I'm looking at implementing a large scale email server (cluster) to handle POP3 and IMAP4 for about 25000 people, including a lot of attachments. I'd like to go for an Open Source solution, but a lot of people around here want to go for Microsoft Exchange on NT. Has anyone here successfully built anything like this? Can you recommend any combinations and components which are particularly efficent, capable, secure and reliable?"

16 of 484 comments (clear)

  1. Cyrus probably a good bet. by X · · Score: 3

    The Cyrus server at CMU is probably your best bet. You'll find it at at this link.

    It's worth noting that this project is currently supporting all of CMU's e-mail needs. It's also my understanding that it forms the basis for Netscape's Message Server and Post.Office. This should satisfy any concerns about it's scalability. It has lots of handy features like kerberos authentication, a database style message repository, support for ACAP, etc.

    Alternatively try QMail. Personally, while I think it provides better SMTP performance than Sendmail, I'd rather use the Cyrus IMAP server than the UW one (the only one supported by QMail). You could go with using a combo of sendmail|postfix + Cyrus for incomming mail (i.e. what your MX records point to) and QMail for outgoing mail. It depends on your performance needs

    Exchange Server is NOTORIOUS for being both difficult and expensive when you need it to scale to a large number of users, although I understand it's improved substancially since the 4.x days when it was just impossible.

    --
    sigs are a waste of space
  2. Run, do not walk, away from Exchange. by xeno · · Score: 5

    I say with relative authority: Puh-leez!

    MS would like people to believe that Exchange is an enterprise-level communications tool, when it fact it is a buchered and bloated decendant of a mediocre 1992 X.400 email system from Data Connection Limited (check out http://www.datcon.co.uk/press/messserv.h tm) Don't believe the version number; Exchange is in its second major release (4.x really is 1.x, 5.x = 2.x, etc) and still has significant stability problems.

    In my experience, Exchange can support 300 users per server happily on commonly acceptable x86 corporate server hardware (say, a 2 processor PII with 512mb ram). It seems that (in my limited experience, lest MS lawyers take this to be a declaration of fact, which it is not) once you've reached this level, doubling the ram and adding more cpu's has only a minimal effect, which means that you really have to add more servers to add capacity.

    Let's do the math. 25,000 users at 500 users per server (to be quite generous) means that you're going to need a Windows NT server farm of about 50 systems just to do email. Again, being generous bargain hunters, let's say you can buy one of these servers for $10kUS. That means you're out $500,000 just for hardware. In my experience, you can support 500 POP users easily on a SPARC 2 or IPX, which can be had these days for about $500 decked out (including a 17" monitor). You could support the same (probably many more) on a $500 x86 box running any of the free *nixes. Assume you blow $500 on disk storage for these boxen just to level the starting line, bringing the total cost to $1000 per. That's still only $50,000.

    One less zero usually gets the accountants' attention on an expenditure like this.

    But let's talk about administrative support. IMHO you're going to need 1:1 admin per NT server at that usage level, given that remote admin of NT is difficult, and 500 users per server is going to prompt more than the occasional pretty blue interface. (Nevermind the security team you're going to need for a major NT installation.) Say a cheap NT admin costs $50kUS including benefits & overhead. You're looking at an HR budget of $2,500,000us. On the other hand, say you splurge and spend $150kUS per *nix admin. If they couldn't handle 10 little boxen apiece, I'll eat the electrons this was posted with. That's an HR budget of $750,000us.

    That's 1/10th the hardware expense and 1/3 the maintenance expense of using Exchange. And that's (a) making some wild assumptions that benefit the Exchange argument, and (b) assumes that you're running *nix on shit hardware. Spend 5 times as much on hardware for new, supported stuff (say $250,000us, which would buy you a couple of well-outfitted Sparc 4500s, or 10 really gorgeous systems from VA Research). Your downtime will become next to nothing, you'll still have spent only half of what you would have for NT and Exchange, and your ongoing yearly administrative cost will be 1/3 of the other option. The *nix administrative savings alone will pay for the *nix hardware in a few months.

    Oh yeah. I forgot the expense of 50 copies of Windows NT, 50 copies of Exchange Server, and 25,000 client licenses... (*erk*!!)

    --
    I think not...(*poof*)
  3. Notes from Linux '99 by linuxci · · Score: 3

    At the UKUUG Linux '99 conference there was a presentation explaining how they implemented a large scalable mail server using open source software. It was also explained how the total cost of ownership would be much higher if they used an NT solution (even using the figures supplied by MS they'd need more machines and more administrators to keep the servers runnig).

    The open source solution was much more cost effective and has proved fairly stable.

    Unfortunately the proceedings from the event are not yet online, however I'll try and forward you a copy (or post a link to this thread) as it may prove useful to you.
    --

  4. Re:No recommendation... by K-Man · · Score: 5

    I'm short on time, but I wish to submit what may be the ultimate Exchange story:

    A sysadmin at, ahem, a "large jeans manufacturer" was put in charge of Exchange on hundreds of NT servers. He dutifully logged and reported dozens of bugs, system outages, etc., to MS support, as the thing crashed and burned like the Hindenburg II. After a few months of this, Microsoft decided to act on the problems. The solution was simple: they sent a letter to his boss saying he was a troublemaker.

    --
    ---- "If we have to go on with these damned quantum jumps, then I'm sorry that I ever got involved" - Erwin Schrodinger
  5. Where are "Exchange horror stories" online? cost? by Sleepy · · Score: 3

    I hear some people near me talking about Exchange [shudder... been through 2 migrations at companies before].

    Knowing MS Exchange is a "Bad Thing", and I'd like to save the company money where possible, I decided to search the web for a collection of "horror stories and MS Exchange"... to my surprise I couldn't find ANYTHING!

    Now I've seen articles here and there (InfoWorld, news.com etc.) about Exchange bugs, but I would have thought SOMEONE had collected URL's and posted them. Nothing. I'd have to do a lot of research to get this info, and given my workload it would be an unwise distraction.

    The second thing I'd like to know, is how much does MS Exchange COST? I know the price varies, and larger companies get breaks if they "cozy" up to MS, but that doesn't help me much. Say a company has 50-150 employees... what does that translate into just for the software licensing?

  6. Re:No recommendation... by Steve+Stock · · Score: 5
    If you are going to setup 25,000 users, do not, repeat NOT, use Exchange.

    Listen to this advice, it's obviously born on the hard back of experience, just as much as me reiterating this same line: do not use exchange.
    For example:

    • Exchange uses a single database (in general) to hold all the mail for a server, the database integrity tools check (and repair) at 1 gig per hour. Now you put 2000 people on a box at say 10megs each, that's 20 hours of downtime to repair (or even check) the mail store. If you do use exchange, have really good backups, it's faster to restore and lose mail than to check the current database.
    • Database corruption seems inevitable, I haven't seen an active high use exhange server that didn't eventually corrupt its database.
    • Exchange is a hardware pig, my experience comes from using exchange on quad PII-400 machines with 0.5gig of ram and we were nearly cpu bound with 3000 users on a box

    This is only a start, but I'm sure other people have many of their own reasons as well...

    I remember our migration of a mere 750 (users) with extreme horror. We had to manually create each user.

    You can create mailboxes in exchange via a config file with the mailbox import tool, although I figured it out by looking at files it created and not via any documentation. With exchange 5.5 I'm pretty sure you can create mailboxes with ldap (although this is far from documented last I looked).

    As to solutions, I haven't used any open source email solutions with more than ~5000 users, for which sendmail and the UW pop3d and imapd worked well for the users that I had (many were very light on email). I'd be really neat to integrate an MTA and an IMAP server with ldap to support IMAP referrals and smart mail redirection. I know some of this is done as sendmail has LDAP patches and example rules for this, but I'm not so sure about IMAP side.

  7. Why Reinvent the Wheel? by atporter · · Score: 4

    Rule number 1 in Linux -- If it's worth doing, someone probably already has. Earthlink has published a really great paper on this subject. Definately worth the read http://www.earthlink.com/about/ papers/mailarch.html

  8. Exchange => Pain by ts4z · · Score: 3
    I've never heard about anyone really happy with Exchange. Except maybe Microsoft, but I'm pretty sure they drug the water.

    Check out Cyrus, from Carnegie Mellon, which is gratis (but not free).

    Or maybe you'd like to spend some money. Then there are lots of companies, like Mirapoint, who I work for.

  9. Large Scale free email by Outland+Traveller · · Score: 5

    When you have that many users you have to have a nice structure for the usernames, which isn't the /etc/passwd file. And, you need a mailbox format that isn't linear, like the normal mbox. The rest of the problems can usually be solved with hardware (think about using a raid).

    I know of three potential semi-free solutions.

    Carnegie Mellon Cyrus (go to the FTP site and download the latest version. Don't rely on the way out of date web page to link to it.) IMAP server.

    University of Washington's imapd. This seems to be under more active development, and supports a nice range of features, mailbox formats, and security mechanisms. However, it uses the passwd file (although you might be able to get around this using PAM) and it doesn't natively support quotas. (although you can do this at the OS level.

    Darthmouth's Blitzmail Server: This has been ported to linux, and is *wonderfully* scalable across multiple machines. It inlcudes its own directory services too. The only problem is that it doesn't support Imap (although some work has started on that front), and the only database it supports as a backend is oracle. I would love it if someone hacked it to use mysql of postgresql with IMAP support, but that's a tall order. The client is also under-featured.

    All of these have their drawbacks though. You might wish to go with a commercial IMAP/POP server on linux. There are a few good ones that exist. You definitely don't want to go with exchange. A lot of people go that route because they are forced to. My experience with exchange 5.5 was so bad that I would not recommend it to anyone.

    -OT

  10. Well, over here at Cisco... by kend · · Score: 5

    Sendmail's the answer for us. The only thing that hasn't scaled well is plaintext aliases files: we've got some 20K mail lists, and it's beginning to get somewhat messy, so we're having to go to the non-plaintext solution. But for all the rest, it's stock sendmail with various GUI backends for end-user ease-of-use (and security). Note that we don't have 25K users, but 17K isn't that far off, and we do a *lot* of e-mail.

  11. No recommendation... by FascDot+Killed+My+Pr · · Score: 3

    ...except an anti-recommendation.

    If you are going to setup 25,000 users, do not, repeat NOT, use Exchange. I remember our migration of a mere 750 with extreme horror. We had to manually create each user.

    Of course I was simply a lowly programmer working under the direction of our totally incompetent network admin--maybe there was an easier way and she missed that topic in the training the week before.

    What you really need is a requirements analysis. Exchange is a totally different thing than, say, Sendmail. Analyzing what you need will tell you which to go with. For instance, do you need public folders, scheduling, etc? If so, maybe use Exchange. Do you need configurability, speed and Internet email? Then you want not-Exchange.
    ---
    Put Hemos through English 101!

    --
    Linux MAPI Server!
    http://www.openone.com/software/MailOne/
    (Exchange Migration HOWTO coming soon)
    1. Re:No recommendation... by ibbieta · · Score: 3

      Yes, please, for your sanity, do not use Exchange unless you have to. It is large and cumbersome and requires a large server with expansive drives for even one hundred users.

      I use and maintain an Exchange server (well, three) and the main server consumes 10 gigs of a harddrive and all of a 333 MHz Pentium. This is for about 200 users and most are not that active.

      Besides the hardware overhead there are other negatives to Exchange. Namely, it does not route internet traffic well, it has poor error reporting, and it "clusters" badly. I'll take each point one by one.

      My company has affiliates in small offices around the world and they have neither the on-site resources or talent to maintain an e-mail server so these offices use our Exchange server as POP3 and SMTP. This creates an open relay and all attempts to close the relay have met with stiff opposition -- users complaining they now have to use a password, cannot remember what domain they are on, and general users resisting change. At the moment, Exchange has no true "Back Office" solution for this problem and I would have to personally configure all of our affiliate offices if I want to completely secure routing.

      The error reporting come down to this -- either you log all of the messages passing through Exchange or none of them. I wanted to log the messages that caused errors for obvious reasons and after about 4 days noticed the drives filling up with archives all all the messages, not just those messages generating errors. Microsoft admits this is a problem but there is still no fix, at least not in SP2.

      And finally, "clustering". I'm not talking about true clustering but instead about using multiple Exchange servers to distribute the load somewhat. We have two e-mail domains and wanted to start putting people on the second domain to balance the load. Each server runs fine on its own but for some reason they hate talking to each other. The replication services keep stopping (pausing, really) and site connector is more frustrating than helpful.

      I have not had many problems with our Exchange server otherwise. It runs forever and reliably. It has the longest uptime of any of our NT machines, only needing a reboot every month or two. However, I'd think long and hard before accepting a job caring 25,000 user's e-mail if the server were NT. Anything over about 1000 users you should look elsewhere if you can.

  12. Sendmail @ Netcom by Bryant · · Score: 3

    Upwards of 30K shell users, four Sparc 2s, SunOS 4.x, sendmail. And a lot of email. Our only big issue was the number of files in /var/spool/mail, which we coped with by going to Network Appliance NACs.

    We noted that directory lookups got worse in a distinct knee -- i.e., we had no problems for a long time and then we hit a magic number and things went all to hell. I do not know offhand how well linux or Solaris deals with directory lookups, but you could test easily enough.

    The thing you didn't tell us was what the volume would be like; the number of users matters for the mail spool but the number of email messages matters for the CPU usage... I suspect that you won't need a very heavy box, though. Email is cheaper than you might think.

    Oh. Run a DNS server on the mail hub, to avoid a lot of lengthy DNS queries on some other poor machine. Flush the cache daily.

  13. That's me: here are the details by mbeattie · · Score: 4

    The talk was "The Design and Implementation of a Large Scalable Mail Server". It's about the mail cluster I set up here for Oxford University and it sounds similar to what the original request was for. We have about 30000 users. I successfully argued against MS Exchange and designed and built a completely Open Source solution based on a Linux cluster with 250GB of disk, UW imapd/ipopd, Exim (MTA) and an Apache/mod_perl-based web to mail gateway that I wrote called WING. The two Solaris nodes in the cluster were there for political reasons and are being replaced by Linux boxes within the next few weeks. There is a WING web page and mailing list which includes a link to the PostScript slides of the talk. The slides will also be shortly be available from UKUUG.

  14. Exchange on NT for 25000 people??? PLEASE, NO!! by Festus · · Score: 3

    To be perfectly blunt, to implement Exchange like that would be *INSANE*.

    First of all, suggesting to implement an NT solution for an organization of that size is already tempting your job security, but to actually do it?

    Assuming standard users and needs for this system, I can only recommend using a Lotus Notes/Domino system. If you've got the cash, there is simply no better solution out there, or even close.

    Run Domino (the server end of Notes) on several UNIX servers. Solaris (SPARC and x86), AIX, and HP/UX are all supported, with a Linux port (Caldera 2.3 (currently in beta) and Red Hat 6.0 will be supported, as well as SuSE 6.1 and Pacific HiTech) on it's way Q4 99 per DevCon.

    Notes has got all you'll ever need, and R5 simply blows away anything M$ has out there. You've got to pay for seats with Notes, but to tell you the truth, Exchange is free, and you get less than you pay for.

    Plus, your users can run the Notes client on any Win32 they think is prettiest (please tell me you'll use NT and not 9x on the client end).

    Look at this for a guy in your situation who had to deal with Exchange.

    Some other really good links are here, here, and here:

    http://www.notes.net/50beta.nsf/7d6a87824e2f0976 8525655b0050f2f2/35BEC3BF6D717A3F852567120 07A435A?OpenDocument
    (problem with the last one, copy it and cut out the space that is stuck between the zero's, the href tag keeps putting it in! It is a great article though : )

    (TIP: Show the guys with the money those links so they know why you should use a Domino/Notes solution.)

  15. Outlook doesn't scale, look at other solutions by anticypher · · Score: 4

    Having to still support an old network installation run by a bunch of idiots (they are attempting to implement a mostly micro~1.oft shop), I can tell you that outlook doesn't scale to more than 2000 users before the maintenance starts to become a headache.

    This is a large client trying to implement a server farm of 20+ NT machines, each server supporting 600-800 users, and combining the whole lot into a coherent whole. Fortunately I only have to fix their poor network designs. The team of administrators now numbers more than 50, most are MCSEs, none less than 5 years experience with Micro~1.oft products. They are tearing their hair out on a daily basis. Complaints number in the hundreds every day, and thats just the users who haven't given up completely.

    My advice is to start looking at the larger commercial products, possibly Netscape's server. Get a reputable vendor to support it.

    If you look at open source systems, start with OpenBSD and NetBSD.

    Divide your system up between the MTA doing delivery/reception of the messages, and the MTA serving the users. Its ok if email to the outside world goes down for short periods of time, its almost expected. But if users cant get to their mailbox 100% of the time, you will look bad.

    You also need to look at managing more than 32000 or 65000 users in the future, remember that various *nixes have either 15 or 16 bit UID fields. You should make sure user accounts/authentication/logins are separate from any UID system on any machine type. This means getting some kind of medium sized DB, and tying it into your auth and login schemes. Others have done it, its not that hard (look at AOL with 10million+ user accounts)

    the AC

    --
    Hemos is like...sci-fi fans;he thinks technology is cool, but he hasn't bothered to understand the science it's based on