I spent last week setting up email servers with trying all MTA and I was able to send and receive emails with attachments and do spam filtering.

Now my concern is what if I got too many users and too many domains with emails that have attachments. By time servers' quota would be used and there will be no space.

My question is, how to setup dynamic servers to serve emails? I want it to be flexible like I will add multiple domains and users and I can't give each domain it's own server because they may add later more users. Simply, I want to setup a service that scale.

To be clearer, I want to make a service like Google Apps and Zoho Mail.

  • 1
    "To be clearer, I want to make a service like Google Apps and Zoho Mail." Good luck! – gf_ Jan 9 '16 at 13:23
  • @gf_ I'm feeling a bit sarcasm in here. Anyway, nothing too big, nothing too small. Thanks for your motivation :) – Mohamed Atef Jan 9 '16 at 18:08

Are you solving an actual problem you have? How can you predict which components in your system will scale and which will need some work? The most unpredictable element here is your user base, and it doesn't even exist yet. Maybe some people will send lots of big attachments, or maybe some will create lots of mailboxes that see very little use. Point is, you don't know so get yourself in a position to identify problems as they come.

| improve this answer | |
  • This is called risk management. I don't want any email to go down when I have to scale – Mohamed Atef Jan 11 '16 at 13:05
  • @MohamedAtef I'm telling you that your sense of risk management is not calibrated correctly here. Nothing you mentioned in your question merits over-engineering your design – Joel E Salas Jan 11 '16 at 23:57

Generally, you deal with sending and receiving mail through your MTA, but storage and access considerations are handled by the MDA (mail delivery agent, like dovecot).

You will obviously have to figure out some way of mapping particular users and domains to particular MDAs and a partitioning algorithm for scaling out, but guiding you through the process of doing this is far beyond the scope of an answer here. I suggest you start by considering the mechanisms provided in your MTA and MDA of choice for conditional delivery, and then give it a shot.

Doing something like that is not going to be a small or quick project.

| improve this answer | |

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