grit639
grit639

Reputation: 346

Why 2 different servers (incoming and outgoing) in mail servers?

I have a basic question about mail servers. Usually any general server (not necessarily mail servers) handle all kinds of related requests i.e. both direction interaction with client (like sending and receiving msg to and from client) but in case of mail servers, there are 2 different servers -- one for outgoing messages called outgoing server following SMTP protocol and another for incoming messages called incoming server following POP3/IMAP protocol. Why so? . For that matter couldn't the 2 protocols be accommodated in one single protocol to handle both direction message flow. Also, typically are these 2 servers hosted on same machine in a general business?

Upvotes: 0

Views: 1576

Answers (2)

Max
Max

Reputation: 10985

Because the protocols are old. In the old Unix tradition, and ignoring UUCP for now:

SMTP came first, to transfer mail between sites, and mail was read locally on the server/network using a text mode client when logged in. There was no need to fetch mail, you used the 'mail' command, and it accessed your local mail spool (a file containing your mail, sitting on the file system, that the SMTP server appended to).

Later on, came the development that people wanted to read mail on their own hosts so a protocol was invented to serve that. The POP server would read that same spool file, and allow you to download all your messages to your intermittently connected client computer. SMTP was reused for sending mail because it already existed and was easily adapted for that purpose.

These days, there are usually three servers of note: SMTP submission server, SMTP transmission server, and IMAP. The submission server is where end users of the service submit their e-mail to be forwarded onto the final host, for example the Google server a Gmail user submits their email to (on port 465 or port 587, usually, with authentication). The transmission server is responsible for delivering and receiving email between sites (eg. when Yahoo and Gmail exchange mail for their customers with each other, on port 25). And IMAP is used by an end user to fetch their email.

These three services, on large sites, are generally served by separate servers on separate hosts. On very large services, like Gmail, they are separate pools of servers.

On a small business host, they were often just one machine.

There are newer and more integrated protocols. For example, both EAS and EWS have mail fetch and submission contained in the same protocol.

Upvotes: 2

Slawomir Dziuba
Slawomir Dziuba

Reputation: 1325

Personally, I regret that almost nobody uses UUCP anymore :)

The separation of shipping, management and collection of mail has a historical, philosophical and design basis. This is in line with the spirit of the Unix world: "do one thing but do it right" and "make everything as simple as possible".

How complex the issue of e-mail is and how much technology it covers, read here: https://en.wikipedia.org/wiki/Email and then see the relevant RFCs in the footnotes for details.

It is difficult to implement a monolithic program that takes into account all the nuances of e-mail and at the same time keeping it simple (Simple in SMTP). Such a monolith would be a nightmare to develop, maintain and administer, and the post office has changed many times since the 1970s.

As for the second question, there is no reason to use the same physical machine, but there are also no contraindications other than the amount of resources available.

Upvotes: 1

Related Questions