Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking to setup an email server which can accommodate hundreds of accounts with "unlimited" email space. I understand that there is no such thing as unlimited but I am under the impression I can RAID several disks (or a bunch servers) as I go.

To demonstrate my need: I could start with a single server with 500GB space now I need provisions or a plan for additional x number of 500GBs drives in the future (all seen as one big drive). I do not know how to properly do this or if this is the best approach to my goal. Your advice will be very much appreciated.

To put simply: How do I best handle expected email storage expansion in the future?

share|improve this question
4  
Well, nothing is "unlimited". If someone suggests service that provides 200 TB storage, you might need 2000TB. You should provide some rough estimate of how much space do you really need. –  dusan.bajic Feb 21 '12 at 8:22
1  
Typically, a design for a very large mail server setup would include distributed storage. Take a look at distributed storage filesystems like GlusterFS, get acquainted with the limitations and possibilities, find a suitable IMAP server and make sure to plan more thoroughly than you've done yet. –  syneticon-dj Feb 21 '12 at 8:30
2  
@IMB, no offense intended, but it really looks like you don't even know where to begin... you are not missing some minor technical detail here, you are missing the whole picture of professional hosted services. –  Massimo Feb 21 '12 at 9:14
1  
Aside from anything else, most actual "unlimited" services aren't - they just have very high limits that they increase frequently. This might sound like I'm nitpicking but I do think that the first thing you need to do is define precisely what you mean, because that is most likely to be the first question that any supplier you take this to will have. –  RobM Feb 21 '12 at 9:30
3  
OK, you've fixed this to not be a shopping question (so I've re-opened it), but fair warning: You probably won't get a how-to answer beyond "Hire staff with experience in large scale infrastructure build-outs". As everyone else has said, this is nowhere near as simple as you think it will be... –  voretaq7 Feb 21 '12 at 18:03
show 5 more comments

2 Answers

up vote 5 down vote accepted

As others have pointed out, nothing is infinite. All storage offerings have their limits, and you should set limits you are comfortable with as a sysadmin.

If you're only comfortable with a single-mail-server architecture then build a box with lots of disk, set a max number of accounts and max mailbox size per account, and let those limits be known.

If you're comfortable with scaling up a major storage/front end architecture be up front abut the costs, the time involved to design and build it, and the limitations that will be present even in that sort of environment.

If your limits do not work for your company/clients seek out alternative ways of providing the services they require (like having Google host their email).


A view from inside email hosting

Starting simply: One server. One GIANT disk array, and say 1000 users.
Some users will have 1 email in their inbox. Some will have one million.
Some will use one megabyte of storage. Others will chew up gigabytes of your disk.

So, we have 1TB of disk (1000GB), and we expect the server to host 1000 users. We can commit 1GB of disk to each user. This is reasonable in that (a) it's a lot of space for email, and (b) we can quota each user at their limit, and if every user hits the limit they still won't affect the other users.

But one day our users want MORE space -- Aunt May is getting videos of the grandkids, and she's hitting her storage limit. Since she (and all our other users) refuse to delete any email we have to do something, but we can't afford more disk.

What do we do? Easy: Just increase everyone's limit to 2GB. With the same disk. We can get away with this overcommitment because for every Aunt May getting 2GB of video data stuffed in her inbox there's an Uncle Joe who never gets any email and is only using 1-2K of disk space. Our users are happy, and we didn't spend any more money (this is what gmail, hotmail, etc. do).


Of course the day will come when we run out of space on this server. Maybe we have a few too many Aunt May's, or maybe we sold more accounts and need to put them somewhere. What do we do now?!?

Well there are two options:

  • Buy more disk
    This is the easy solution -- Add more disks to the server and split the mail stores up between them (or if you're using ZFS or something else that lets you grow a partition just make the mail store bigger).

  • Buy more servers
    This one is a bit more complicated -- basically just buy a new server and put your new users on the new box.
    It doesn't solve the problem of "Too many Aunt May's hogging the disk" though -- for that you would need to move some of them to the new machine (which can be inconvenient). It does solve workload issues for the server by splitting up the incoming/outgoing mail into blocks by user (though there's no guarantee the workload is evenly distributed).

  • Invest in a proper storage and processing architecture This one is the best (and most expensive) option: Throw in a SAN, and connect several head-end mail servers to it. As you fill the SAN you keep adding disks and extending the partitions (just like in "Buy more disks" above), and as the inbound/outbound mail workload climbs you'll add more head-end servers (behind a load-balancer of some kind) to deal with the mail volume.

The last bullet above is is where you can expect to have to get to if you take hosting email seriously. Note that the rabbit hole goes further, because at that point you may need to deal with redundancy.


One mail server is never enough for something like this. You need a metric buttload of them, connected to a storage back-end the size of the Pacific Ocean to feed your user's voracious appetites for disk space / mail storage. It is a substantial investment in design, equipment and maintenance.
My recommendation as someone who has been there and done that? Leave the mail hosting to Google if at all possible.

share|improve this answer
    
Thank you for the comprehensive answer. –  IMB Feb 22 '12 at 14:12
add comment

There's no standard recipe for this, but I think it's safe to assume that, if you want to scale to Big Numbers for users and/or mailbox sizes, "an email server" is not going to be enough. Providing this kind of service requires a lot more thought, resources and MONEY than setting up some standard email package with a big disk.

share|improve this answer
    
I understand, that is why am I looking for suggestions on the best way to go about this. The company has a budget so money won't be a big issue so long as it's the best way to go. –  IMB Feb 21 '12 at 8:26
3  
well, the first thing you need to spend money on is someone who knows how to do this, or more likely, a team of people. –  Sirex Feb 21 '12 at 8:53
    
@Sirex I am under the impression any reputable hosting company is able to provide this or is it really that special? –  IMB Feb 21 '12 at 9:09
1  
The hosting company's goal is to jam your needs into whatever convenient box that they have. If this happens to accidentally fit what you really need, good for you. If not, well that just kind of sucks. I guess what I'm saying is that getting the best solution for you is not their goal, getting the best solution for them is. If you want the best solution for you, you need to hire people that will have that as their goal. –  EBGreen Feb 21 '12 at 17:14
1  
@EBGreen Speaking as someone who worked for one of those hosting companies, that's not STRICTLY true: It's very easy to break out of the boxed solutions: Pay INSANE amounts of money and the hosting company will do whatever you want. (Of course this typically needs to cover your hosting bill, plus full-time staff to bend to your whims. It's often cheaper to hire your own staff :-) –  voretaq7 Feb 22 '12 at 14:31
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.