Yandex
Update cookies preferences

What is a mail server and how does it work

A mail server plays an important role in the exchange of messages between the sender and receiver of e-mail. This is especially important for online businesses where a mailbox is "attached" to a domain, making the mail server a corporate tool for internal and external communication.
 

Why you need a mail server and what it is

A mail server is a program that runs on a machine with the same name. It performs several important functions: receiving, processing and forwarding e-mails. Each e-mail goes through several stages of processing: checking if the address is correct, scanning for spam, viruses, and other potential threats. After successful processing, the e-mail is sent to the recipient's mail server.
 

What is an mail client

Messages are exchanged between servers using an email client. This is a very useful tool that helps to organize and simplify the work with e-mail. With its help you can receive, store and send e-mails from different mailboxes without having to open each one in a separate window.
In addition, you can use your email client to forward received messages, set up auto-subscription. Some email clients also offer advanced features thanks to built-in functions or integration with third-party programs and services. For example, you can create tasks from emails so that you don't forget about important matters.
The mail client (agent) automatically synchronizes with all your mailboxes, downloading new messages according to your settings. Already read e-mails are available offline on your computer or smartphone without internet access.
 

How the mail server works

  • The mail client contacts DNS servers to retrieve an MX record that points to the destination server of the message.
  • A connection is established between the sender and recipient mail servers.
  • The mail client sends the message to the recipient's mail server.
  • The received message is delivered to the recipient.
  • If the recipient has a mail client, the recipient can receive the message using POP3 or IMAP protocols.
In a real-world environment, the message delivery process can be more complex, especially in large organizations with additional features like message archiving. But the basic steps remain the same.
 

Email system protocols

The transfer of mail between mail servers is accomplished using protocols, each with its own port - connection point.
 

POP3

Unlike other protocols, it does not save emails on the server, but downloads their copies to devices: computer, laptop or smartphone. After downloading, the original e-mails are deleted from the server. Thus, the e-mails do not remain on the server, and if you delete an e-mail from your device by mistake, you cannot download it again. However, the e-mails can be viewed at any time, even without access to the Internet. The protocol uses port 110 to receive unencrypted e-mails and port 995 for encrypted e-mails.
 

IMAP

This protocol allows you to read emails from any device connected to the Internet. IMAP downloads an e-mail to your device only when you click on it. You can filter and download necessary e-mails without downloading them all at once, only the text will be downloaded. To view attachments, you need to connect to the internet and open the email in your email client. Port 143 allows you to receive unencrypted e-mails. Port 993 - encrypted.
 

SMTP

Allows the sender to establish a connection to the mail server using special commands. In this way, the email is delivered quickly and securely. However, the protocol does not support the transmission of images in the body of the message, pictures can only be added as attachments. By default, the protocol uses port 25 when sending an unencrypted message and port 465 when sending an encrypted message.
 

HTTP

Although the primary purpose of HTTP is to transfer web pages, it can also be used to access web versions of mailboxes. The browser sends a request to the server where the HTML document of the mailbox web page is located. The server responds to the request by providing the requested data. The browser displays them as a single web page.
 

Advantages of using your own mail server

  • Increased security - only authorized persons have access to the server.
  • Customization of corporate mailboxes in accordance with the specifics of your company.
  • No hosting fees (you only need to pay for domain registration in case of corporate mail).
  • 100% control over system settings, including forwarding rules, storage volume restrictions and other parameters.
  • In case of failures, you can quickly determine the source of the problem and restore the system.
  • Simplified in-house mass mailings.
 

Summary

A mail server is a key tool for exchanging email messages. It consists of two main components - the email client through which users send and receive emails, and the set of protocols that enable the transmission and delivery of those emails. If you are installing the software on a physical server - it will require nuanced knowledge and investment. A proprietary mail server offers the greatest opportunity to protect sensitive data.
23 Apr 2024, 18:35:11