Simple Mail Transfer mechanism (SMTP) is a mechanism for exchanging email messages between servers. It is an essential component of the email communication process and operates at the application layer of the TCP/IP protocol stack. SMTP is a protocol for transmitting and receiving email messages. In this article, we are going to discuss every point about SMTP.
What is Simple Mail Transfer Protocol?SMTP Protocol
- End-to-End Method
- Store-and-Forward Method
Model of SMTP System:
![SMTP Model](https://media.geeksforgeeks.org/wp-content/cdn-uploads/gq/2017/02/SMTP_1.png)
- Mail User Agent (MUA): It is a computer application that helps you in sending and retrieving mail. It is responsible for creating email messages for transfer to the mail transfer agent(MTA).
- Mail Submission Agent (MSA): It is a computer program that receives mail from a Mail User Agent(MUA) and interacts with the Mail Transfer Agent(MTA) for the transfer of the mail.
- Mail Transfer Agent (MTA): It is software that has the work to transfer mail from one system to another with the help of SMTP.
- Mail Delivery Agent (MDA): A mail Delivery agent or Local Delivery Agent is basically a system that helps in the delivery of mail to the local system.
- Communication between the sender and the receiver: The sender’s user agent prepares the message and sends it to the MTA. The MTA’s responsibility is to transfer the mail across the network to the receiver’s MTA. To send mail, a system must have a client MTA, and to receive mail, a system must have a server MTA.
- Sending Emails: Mail is sent by a series of request and response messages between the client and the server. The message that is sent across consists of a header and a body. A null line is used to terminate the mail header and everything after the null line is considered the body of the message, which is a sequence of ASCII characters. The message body contains the actual information read by the receipt.
- Receiving Emails: The user agent on the server-side checks the mailboxes at a particular time of intervals. If any information is received, it informs the user about the mail. When the user tries to read the mail it displays a list of emails with a short description of each mail in the mailbox. By selecting any of the mail users can view its contents on the terminal.
![Working of SMTP](https://media.geeksforgeeks.org/wp-content/cdn-uploads/20220222170044/DV.jpg)
- Purpose
- The SMTP envelope contains information that guides email delivery between servers.
- It is distinct from the email headers and body and is not visible to the email recipient.
- Contents of the SMTP Envelope
- Sender Address: Specifies where the email originates.
- Recipient Addresses: Indicates where the email should be delivered.
- Routing Information: Helps servers determine the path for email delivery.
- Comparison to Regular Mail
- Think of the SMTP envelope as the address on a physical envelope for regular mail.
- Just like an envelope guides postal delivery, the SMTP envelope directs email servers on where to send the email.
S.No. | Keywor | Command form | Description | Usage |
---|---|---|---|---|
1. | HELO | HELO<SP><domain><CRLF> | It provides the identification of the sender i.e. the host name. | Mandatory |
2. | MAIL<SP>FROM : <reverse-path><CRLF> | It specifies the originator of the mail. | Mandatory | |
3. | RCPT | RCPT<SP>TO : <forward-path><CRLF> | It specifies the recipient of mail. | Mandatory |
4. | DATA | DATA<CRLF> | It specifies the beginning of the mail. | Mandatory |
5. | QUIT | QUIT<CRLF> | It closes the TCP connection. | Mandatory |
6. | RSET | RSET<CRLF> | It aborts the current mail transaction but the TCP connection remains open. | Highly recommended |
7. | VRFY | VRFY<SP><string><CRLF> | It is use to confirm or verify the user name. | Highly recommended |
8. | NOOP | NOOP<CRLF> | No operation | Highly recommended |
9. | TURN | TURN<CRLF> | It reverses the role of sender and receiver. | Seldom used |
10. | EXPN | EXPN<SP><string><CRLF> | It specifies the mailing list to be expanded. | Seldom used |
11. | HELP | HELP<SP><string><CRLF> | It send some specific documentation to the system. | Seldom used |
12. | SEND | SEND<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal. | Seldom used |
13. | SOML | SOML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal if possible; otherwise to mailbox. | Seldom used |
14. | SAML | SAML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal and mailbox. | Seldom used |
SMTP is an application-layer protocol. The client who wants to send mail opens a TCP connection to the SMTP server and then sends the mail across the connection. The SMTP server is always in listening mode. As soon as it listens for a TCP connection from any client, the SMTP process initiates a connection through port 25. After successfully establishing a TCP connection, the client process sends the mail instantly.
SMTP
The SMTP model is of two types:
The end-to-end model is used to communicate between different organizations, whereas the store-and-forward method is used within an organization. An SMTP client who wants to send mail will contact the destination’s host SMTP directly to send the mail to the destination. The SMTP server will keep the mail to itself until it is successfully copied to the receiver’s SMTP.
In the SMTP model user deals with the user agent (UA), for example, Microsoft Outlook, Netscape, Mozilla, etc. To exchange the mail using TCP, MTA is used. The user sending the mail doesn’t have to deal with MTA as it is the responsibility of the system admin to set up a local MTA. The MTA maintains a small queue of mail so that it can schedule repeat delivery of mail in case the receiver is not available. The MTA delivers the mail to the mailboxes and the information can later be downloaded by the user agents.
SMTP Model
Working of SMTP
Keywor | Command form | Description | Usage | |
---|---|---|---|---|
1. | HELO | HELO<SP><domain><CRLF> | It provides the identification of the sender i.e. the host name. | Mandatory |
2. | MAIL<SP>FROM : <reverse-path><CRLF> | It specifies the originator of the mail. | Mandatory | |
3. | RCPT | RCPT<SP>TO : <forward-path><CRLF> | It specifies the recipient of mail. | Mandatory |
4. | DATA | DATA<CRLF> | It specifies the beginning of the mail. | Mandatory |
5. | QUIT | QUIT<CRLF> | It closes the TCP connection. | Mandatory |
6. | RSET | RSET<CRLF> | It aborts the current mail transaction but the TCP connection remains open. | Highly recommended |
7. | VRFY | VRFY<SP><string><CRLF> | It is use to confirm or verify the user name. | Highly recommended |
8. | NOOP | NOOP<CRLF> | No operation | Highly recommended |
9. | TURN | TURN<CRLF> | It reverses the role of sender and receiver. | Seldom used |
10. | EXPN | EXPN<SP><string><CRLF> | It specifies the mailing list to be expanded. | Seldom used |
11. | HELP | HELP<SP><string><CRLF> | It send some specific documentation to the system. | Seldom used |
12. | SEND | SEND<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal. | Seldom used |
13. | SOML | SOML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal if possible; otherwise to mailbox. | Seldom used |
14. | SAML | SAML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal and mailbox. | Seldom used |
Difference Between SMTP and Extended SMTP
SMTP | Extended SMTP |
---|---|
Users were not verified in SMTP as a result of massive-scale scam emails being sent. | In Extended SMTP, authentication of the sender is done. |
We cannot attach a Multimedia file in SMTP directly without the help of MMIE. | We can directly attach Multimedia FIle in ESMTP. |
We cannot reduce the size of the email in SMTP. | We can reduce the size of the email in Extended SMTP. |
SMTP clients open transmission with the command HELO. | The main identification feature for ESMTP clients is to open a transmission with the command EHLO (Extended HELLO). |
Keywor | Command form | Description | Usage | |
---|---|---|---|---|
1. | HELO | HELO<SP><domain><CRLF> | It provides the identification of the sender i.e. the host name. | Mandatory |
2. | MAIL<SP>FROM : <reverse-path><CRLF> | It specifies the originator of the mail. | Mandatory | |
3. | RCPT | RCPT<SP>TO : <forward-path><CRLF> | It specifies the recipient of mail. | Mandatory |
4. | DATA | DATA<CRLF> | It specifies the beginning of the mail. | Mandatory |
5. | QUIT | QUIT<CRLF> | It closes the TCP connection. | Mandatory |
6. | RSET | RSET<CRLF> | It aborts the current mail transaction but the TCP connection remains open. | Highly recommended |
7. | VRFY | VRFY<SP><string><CRLF> | It is use to confirm or verify the user name. | Highly recommended |
8. | NOOP | NOOP<CRLF> | No operation | Highly recommended |
9. | TURN | TURN<CRLF> | It reverses the role of sender and receiver. | Seldom used |
10. | EXPN | EXPN<SP><string><CRLF> | It specifies the mailing list to be expanded. | Seldom used |
11. | HELP | HELP<SP><string><CRLF> | It send some specific documentation to the system. | Seldom used |
12. | SEND | SEND<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal. | Seldom used |
13. | SOML | SOML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal if possible; otherwise to mailbox. | Seldom used |
14. | SAML | SAML<SP>FROM : <reverse-path><CRLF> | It send mail to the terminal and mailbox. | Seldom used |
The Simple Mail Transfer Protocol (SMTP) commonly uses port 587 for secure transmission via TLS. While port 465 was previously supported by many providers, it is no longer an accepted standard. Additionally, port 25 is mainly used for SMTP relay, not for SMTP submission. Although port 2525 is not an official SMTP port, it can serve as a good alternative
Extended SMTP | |
---|---|
Users were not verified in SMTP as a result of massive-scale scam emails being sent. | In Extended SMTP, authentication of the sender is done. |
We cannot attach a Multimedia file in SMTP directly without the help of MMIE. | We can directly attach Multimedia FIle in ESMTP. |
We cannot reduce the size of the email in SMTP. | We can reduce the size of the email in Extended SMTP. |
SMTP clients open transmission with the command HELO. | The main identification feature for ESMTP clients is to open a transmission with the command EHLO (Extended HELLO). |
- If necessary, the users can have a dedicated server.
- It allows for bulk mailing.
- Low cost and wide coverage area.
- Offer choices for email tracking.
- Reliable and prompt email delivery.
- SMTP’s common port can be blocked by several firewalls.
- SMTP security is a bigger problem.
- Its simplicity restricts how useful it can be.
- Just 7-bit ASCII characters can be used.
- If a message is longer than a certain length, SMTP servers may reject the entire message.
- Delivering your message will typically involve additional back-and-forth processing between servers, which will delay sending and raise the likelihood that it won’t be sent.
Conclusion:
SMTP is a fundamental part of email communication that allows messages to be reliably transmitted between email servers. Despite its drawbacks, such as security problems and the possibility of spam, SMTP is still widely used due to its simplicity, efficiency, and broad support across various email systems. Enhancements such as encryption and authentication may solve some of its security issues, making it an appropriate choice for email delivery in a variety of applications.
"This Content Sponsored by Buymote Shopping app
BuyMote E-Shopping Application is One of the Online Shopping App
Now Available on Play Store & App Store (Buymote E-Shopping)
Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8
Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication"
===========================================================================
No comments:
Post a Comment