In today’s lesson, we will focus on the purpose and definition of a mail server. This is a very important server, and probably one of the first you need to take into account when designing your new infrastructure.
Without even thinking about it, you are receiving and sending emails as you read those lines. The email goes from you to another point around the globe in a matter of seconds. We take it as granted, giving little thought to how this actually happens, but this is a complex process that is achieved with the help of a mail server.
A mail server is a computerized analogy to the neighborhood mailman (just a bit faster), but even though it looks like an email is sent from one PC to another PC in a blink of an eye, it actually jumps through several mail servers around the world until it reaches its destination. Without those servers, you could only send emails to the same addresses on matching domains only.
There are 2 types of categories for mail servers – Outgoing mail servers and incoming mail servers.
Outgoing uses a protocol called SMTP (Simple Mail Transfer Protocol). The incoming mail servers can be either POP3 (Post Office Protocol vs. 3) or IMAP (Internet Message Access Protocol). The POP3 servers are storing the mails on local hard drives or PCs, whilst the IMAP protocol stores the emails on servers, but this is boring stuff.
Back to our explanation – Basically, what happens is when you press send on your email, whether it’s Outlook, Gmail, Yahoo or any other email service, the email client connects to your domain’s SMTP server. Then, the email client communicates with the SMTP server (remember, this is for outgoing mail), giving it your email address, the recipient’ email address, and message body along with any attachment(s).
The SMTP server processes the recipient’s email address. If the domain is local, no routing is needed and it goes straight to the domains POP or IMAP server. If the domain is different, the SMTP server will have to communicate with the other domain’s server.
Along its great travels, the SMTP server should encounter the DNS server (which is the server that’s responsible for resolving email addresses to IP address – we will talk about DNS servers in a future nugget). The DNS server will translate the email address to an IP address, which is the language the DNS server speaks fluently.
Now that the SMTP server has the proper IP address of the recipient, it can connect to the recipient SMTP server. This isn’t done directly and the message is usually routed along a series of other SMTP servers until it reaches its destination. Definitely not an easy travel for such a fragile message, but most of the time they make it.
And at last, the SMTP server of the recipient receives the message, scans it to confirm the domain and user name (this step is important when you are filtering spam), and if all is well, it forwards it to the POP server to be read. Once you press on the email, it’s being downloaded. POP usually will download it to the local hard drives, while the IMAP protocol will use a server to download the message to.
This is basically the secret of the mail server – A simple but really complex task behind the scene.
Some may ask “What does it have to do with my business? I’ll just use Gmail or Yahoo. It’s free”. Yes, it is free, but there are those who require a lot of space – usually businesses – and those often have to invest in servers.
Besides the acquiring of the servers, you will need to have a way of receiving and transmitting emails, and setting up your own email configuration and filter.
To that end, you might be using one of 2 very popular programs like Postfix or Microsoft Exchange. Such programs facilitate the process behind the scenes.
At the end of the day, a mail server is a server that is in charge of sending and receiving emails in the back end of the procedure, away from the end user. Their job is to send the messages to the proper destination, receive messages from the proper senders, filter any inappropriate content, and store the archived emails if needed. Because it seems easy for an end user it’s often taken for granted, but still it’s smart to have a basic comprehension on how mail servers work.