SMTP Commands
SMTP commands are the commands that are used by a client
computer to communicate with an SMTP (Simple Mail Transfer Protocol) server.
Before elaborating on SMTP commands, it is imperative to understand what an SMTP server is. An SMTP server refers to that application which serves the main purpose of receiving, sending and/or relaying outgoing mail between email senders and receivers. An SMTP server is similar to any other server with regard to its function of processing data in order to send it to another server but it is more specific in this regard as it processes specifically the data that is related to an email that is being sent, received or relayed. In the absence of an SMTP server, an email that has been sent, won’t arrive at its intended destination. Moreover, it is the SMTP server which corroborates that the outgoing email has originated from an active account. This lets it serve the purpose of being the first safety check when it comes to ensuring the protection of an inbox against illicit emails. In the event that an email fails to get delivered, it sends that email back to the sender. This is very beneficial as it ensures that the sender has the information that he doesn’t have the right email address or that the recipient sever is blocking his email.
Returning to our main topic regarding SMTP commands, these
are sent by the client to the server. Every SMTP command is formed by a keyword
that is followed by 0 (zero) or some argument. This implies that there are
certain keywords which are devoid of any argument. This command has the
following format, keywords: argument(s).
Web Hosting
The context of servers brings to mind web hosting and web
servers. So, before proceeding ahead, some brief information is being provided
on web hosting. Web hosting is a service provided by web hosting service
providers in which server space is leased to website owners. The files of
websites are stored on and delivered from these servers. The necessary
technology and services that keep a website up and running, are also made
available by these web hosting companies. These companies offer various plans
related to different types of web hosting. These web hosts are also referred to
as the “Top Cloud Hosting
Company” or the “Best Windows Hosting
Company” or as the “Best Website
Hosting Company” when the services that these offer prove to be
exceptional.
Basic SMTP Commands
Returning to our main topic that has to do with SMTP
commands, basic SMTP commands are those that are supported by all SMTP servers.
Each of these commands is used between two servers and uses a normal
communication sequence. SMTP protocol is followed in order to ensure the
delivery of emails.
Extended SMTP commands (ESMTP commands) are supported by many
SMTP servers, in order to ensure more flexibility and implement additional
features. SMTP service extension is another term that is used for such an ESMTP
command. These are not included in the information that is to follow. Information
regarding all the basic SMTP commands, which the SMTP protocol has specified,
is provided in the following paragraphs. These are mentioned in no particular
order.
HELO- This SMTP command’s usage is mandatory and it provides the
identity of the sender server (the host name). This command is sent by the
client to the SMTP server in order to identify itself. It starts the SMTP
conversation. The SMTP client’s IP address or domain name is sent in the form
of an argument along with this command. A domain name that can be used as an argument
with the HELO command, has to be an FQDN i.e. a fully qualified domain name.
MAIL FROM- The email address of the sender is specified by it and its
usage is mandatory. Hence, the origin of the mail is specified by it. It
signals the SMTP server the start of a new mail transaction. It ensures the
reset of all the buffers and state tables of the server. This is usually the
first command that is sent post the identification and login process. The
source email address is stated by the sender in the “Form” field and then the
email transfer starts. The server replies with a 250 OK reply code in the event
that the sender’s email address is accepted.
DATA- The start of the mail is specified by it and its usage is
mandatory. This command ensures the beginning of the process of transfer of the
email content (body text, attachments etc.).
Once the client sends this command to the server, a 354 reply
code is sent by the server in response. It implies that permission has been granted
to begin the transmission. Post this, the content can be transferred to the
server. A single dot (“.”) needs to be sent in a line by itself, once all the
content of the message has been sent. The SMTP server sends a 250 reply code as
a response, on accepting the message for delivery.
RCPT TO (Recipient To)- The recipient’s email address is specified by
it. Its usage is mandatory as well. If there are multiple recipients of an
email, this command gets repeated multiple times.
RSET (Reset)- This command, when sent to the mail server, terminates the
current mail transaction. However, the TCP (Transmission Control Protocol) connection
remains open. Every information that has to do with the email data, the sender
as well as the recipient gets removed. Additionally, the state tables and the
buffers are cleared. Its usage is highly advised.
NOOP (No Operation)- As is evident from the term itself, it refers to “no
operation”. Its usage is highly recommended. This command has no other function
except eliciting an “OK” reply from the receiver. It serves the purpose of
confirming that the server is connected as well as able to communicate with the
client.
VRFY (Verify)- This command is used to ascertain the username.
Its usage is also highly recommended. It serves the function of ascertaining
from the server that a particular username or email address is in existence.
Some email servers ignore this basic SMTP command because of security issues. Some
reply will be sent by those servers that ignore this command but the information
that had been asked by the client won’t be sent.
QUIT- It ends the SMTP conversation and closes the TCP
connection. Its usage is mandatory. The server is asked to close the connection
by using this command. The server responds with a 221 code if the connection
can be closed and terminates the session.
Source:https://www.htshosting.org/index.php/knowledgebase/9/Comprehensive-Information-on-SMTP-Commands.html
No comments:
Post a Comment