Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

TCP/IP mail


May 27, 2021 TCP/IP


Table of contents


TCP/IP mail


E-mail is one of the most important applications for TCP/IP.


In what cases you won't use TCP/IP

When you write a message, you do not use TCP/IP.

When you write an e-mail message, you use e-mail programs such as Notes for Lotus software, Outlook for Microsoft, or Netscape Communicator.


The mail program will use...

Your e-mail program uses different TCP/IP protocols:

  • Use SMTP to send messages
  • Use POP to download messages from the mail server
  • Use IMAP to connect to the mail server

SMTP - Simple message delivery protocol

The SMTP protocol is used to transmit e-mail messages. SMTP is responsible for sending messages to another computer.

Typically, messages are sent to one mail server (SMTP server) and then to another (or several) servers, and then eventually to its destination.

SMTP can also deliver plain text, but it can't transfer binary data such as pictures, sounds, or movies.

SMTP uses the MIME protocol to send binary data over the TCP/IP network. The MIME protocol converts binary data to plain text.

The routing process for the message

The SMTP server is based on "The domain name of the intended recipient in the domain name service DNS to route e-mail messages." The SMTP server routes e-mail messages based on the MX records in DNS, which register the domain name and the host in the associated SMTP, to which e-mail messages belonging to the domain should be sent.

If the SMTP server mail.abc.com receive a letter to send to [email protected]:

a: SendMail asks DNS to give the CNME records of the host sh.abc.com, and if so, if the CNME is up to shmail.abc.com, to request the shmail.abc.com's CNME records again until there is no;

b: Assuming that it is shmail.abc.com by CNME, and then SendMail requests the DNS abc.com the domain to give shmail.abc.com MX record of the message,

shmail MX 5 shmail.abc.com

10 shmail2.abc.com

c: SendMail does a good job of requesting DNS to shmail.abc.com A record of the message, i.e. IP address, if the return value is 1.2.3.4

d: SwndMail connects with 1.2.3.4, sends this letter to [email protected] to the SMTP backgrounder of this server.


Mime

TCP/IP mail


POP - Post Office Agreement

The POP protocol is used by mail programs to get back messages on the mail server.

If your mail program uses POP, once it's connected to the mail server, all your messages are downloaded to the mail program (or mail client).


IMAP - Internet message access protocol

Similar to POP, the IMAP protocol is also used by mail programs.

The main difference between the IMAP protocol and the POP protocol is that if IMAP is connected to a mail server, it does not automatically download messages to the mail program.

IMAP gives you the ability to view messages on the mail server side before downloading them. W ith IMAP, you can choose to download these messages or simply delete them. For example, you need to access the mail server from a different location, but you just want to download the message when you get back to the office, and IMAP can be useful in this case.