A brief analysis of SMTP working principle

A brief analysis of SMTP working principle

Email hosting is one of the main services provided by ISPs. Email has revolutionized the way people communicate due to its simplicity and speed of communication. However, there are still a number of applications and services that are required to run email on a computer or other terminal device.

Email is a store-and-forward method of sending, storing, and retrieving emails over a network. Emails are stored in a database on a mail server. ISPs maintain mail servers that can typically support a large number of user accounts.

[[342329]]

Email clients communicate with mail servers to send and receive email. Mail servers also communicate with each other to send email from one domain to another. In other words, when sending an email, an email client does not communicate directly with another email client. Instead, both clients rely on mail servers to transfer the email. This is true even if the two users are in the same domain.

The email client sends mail to the email server according to the address configured in the application settings. When the server receives the mail, it checks if the recipient's domain is in its local database. If not, it makes a DNS request to determine the IP address of the destination domain's mail server. The email is then forwarded to the appropriate server.

Email supports three separate protocols for operation: Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP), and Internet Message Access Protocol (IMAP). The application layer process of sending mail uses SMTP. This is the case when mail is sent from a client to a server and from one server to another. However, clients use one of two application layer protocols to retrieve email: POP or IMAP.

The Simple Mail Transfer Protocol (SMTP) transfers mail in a reliable and efficient manner. For an SMTP application to work properly, the message must be formatted correctly and the SMTP process must be running on both the client and the server.

The SMTP mail format requires that the mail has a header and a body. The mail body has no length limit, but the mail header must have the recipient's email address and the sender's address in the correct format. Other header information is optional. When the client sends an email, the client SMTP process connects to the server SMTP process on the well-known port 25. After the connection is established, the client will try to send an email to the server through this connection. After the server receives the mail, if the recipient is local, it will save the mail in the local account, or forward the mail to another mail server for transmission using the same SMTP connection process.

When you send an email, the destination email server may not be online or may be busy. Therefore, SMTP puts the email into the background and sends it later. The server periodically checks the email queue and tries to send it again. After a predefined expiration time, if the email still cannot be sent, it is returned to the sender as undeliverable.

Post Office Protocol (POP) enables a workstation to retrieve mail from a mail server. Under POP, mail is downloaded from the server to the client and then deleted from the server.

The server starts the POP service by passively listening for client connection requests on TCP port 110. When a client wants to use this service, it sends a request to establish a TCP connection with the server. Once the connection is established, the POP server sends a greeting. The client and POP server then exchange commands and responses until the connection is closed or aborted.

Because email is downloaded to the client and deleted from the server, email is not stored in one specific centralized location. Because POP does not store messages, it is not suitable for small businesses that need a centralized backup solution.

POP3 is ideal for ISPs because it relieves ISPs from the burden of managing large amounts of storage space for mail servers:

IMAP (Internet Message Access Protocol) is another protocol for retrieving email. Unlike POP, when a user connects to a server using IMAP, a copy of the message is downloaded to the client application, while the original message remains on the server until the user manually deletes it. The user views the copy of the message in his or her email client software.

Users can create a file hierarchy on the server to organize and store their emails. This file structure is replicated in the email client. When the user decides to delete an email, the server synchronizes the action and deletes the corresponding email from the server.

For small and medium-sized enterprises, there are many benefits to using the IMAP protocol. IMAP allows long-term storage of emails on the mail server and centralized backup. In addition, employees can access emails from multiple locations using different devices or client software. Regardless of which method is used to access the mailbox, users can use the mailbox folder structure they are accustomed to.

An ISP would probably not choose IMAP. To store so many emails, it would cost a lot of money to buy and maintain disk space. In addition, if the customer wants to regularly back up the mailbox, it will further increase the cost to the ISP.

<<:  Maintaining the championship! H3C continues to lead the Chinese enterprise WLAN market in the first half of 2020

>>:  Empowering thousands of industries, 5G will be implemented first in these areas!

Recommend

MWC19 Shanghai | Ruijie and the operator industry jointly create a 5G world

[[268489]] Mobile communications, starting with G...

Popular science article: What exactly is 5G technology?

[[280757]] Introduction As a post-80s generation,...

Inspur Network Electronics Range Training Base officially launched

Recently, the "Inspur Network Electronic Tar...

5G mobile phones are coming! Who will be the next Nokia?

"With 43 million analog mobile phone users, ...

Just one click to start your journey into Huawei's ICT virtual exhibition car

[51CTO.com original article] The Huawei Enterpris...

What benefits will 5G technology bring to smart fire protection construction?

[[346255]] On the one hand, it is because various...

What are the main problems facing 5G networks?

5G networks are the next generation of wireless t...

Tencent Xingmai Network 2.0 upgrade supports 100,000-card super cluster

With the rapid development of artificial intellig...

LTE Triangulation for Indoor Asset Tracking

What is LTE? LTE stands for long-term evolution a...

How do SD-WAN solutions improve network performance?

In the 2016 National WAN Report survey, responden...