-3

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! – gxx Jan 09 '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 09 '16 at 18:08

2 Answers2

6

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.

Joel E Salas
  • 5,562
  • 15
  • 25
  • 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
5

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.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92