SlideShare a Scribd company logo
1 of 22
SMTP INTRADUCTION :
• It is a TCP/IP protocol that specifies how computers
exchange electronic mail.
• It works with post office protocol (POP).
• SMTP stands for Simple Mail Protocol
• The actual mail transfer is done through messgae
transfer agents
• To send mail, a system must have the client MTA & to
receive mail, a system must have a server MTA
• The formal protocol that defines the MTA client &
server in the Internet is called the simple mail transfer
protocol
Continue……
• As we said before two pairs of MTA clients /
server program are used in most common
situation
• Fig : SMTP range
Continue….
• SMTP is used two times , between the sender &
the sender’s mail server and between the two
servers.
• SMTP simply define how command & response
must be back & forth. Each network is free to
choose a software package for implementation
Basic SMTP ArchitectureBasic SMTP Architecture
• SMTP clients and servers have
two main components:
1.User Agents (UA):
• It prepares a message and
encloses in an envelope.
2.Mail Transfer Agents
(MTA):
• It transfers the mail
across the internet.
Commands and Responses :
• SMTP uses commands & response to transfer message
between on MTA client & in MTA server
• Each commands or reply is terminated by a two character
(carriage return & line feed) end-of-line token
Commands format :
• Command are sent from the client to the server.
• It is consist of a keyword by zero/more arguments SMTP
defines 14 commands.
• It means some keywords do not contain any argument.
• The first five are mandatory; every implemenatation must
support these five commands.
• The next three are aften used & highly recommended. The
last six are seldom used
Keyword : argument(s)
SMTP Responses :
• • SMTP responses are sent from server to client.
• • Each response begins with a three digit code and may
be followed by additional textual information.
• • The leading digits indicate the category of the
response.
The difference categories of response are:
1. Positive completion reply. It indicates that the requested action
has been successfully completed. A new request may be initiated.
• 2. Positive Intermediate reply. It indicates that the command has
been accepted, but the requested action is being held in abeyance,
pending receipt of further information.
• 3. Transient Negative Completion reply. It indicates that the
command was not accepted and the requested action did not occur.
However, the error condition is temporary and the action may be
requested.
• 4. Permanent Negative Completion reply. It indicates the
command was not accepted and the requested action did not occur.
Mail Transfer Phases
The basic SMTP operation occurs in three phases:
• 1. Connection set up
• 2. Mail transfer
• 3. Connection termination
• Connection Setup:
• An SMTP sender will attempt to set up a TCP connection
with a target host when it has one or more mail message
to deliver to that host. The following sequence occurs
during connection setup:
..…continue
• 1. The sender opens a TCP connection with the receiver.
• 2. Once the connection is established, the receiver identifies itself
with '220 Service Ready".
• 3. The sender identifies itself with the HELO command.
• 4. The receiver accepts the sender's identification with "250 'OK".
• 5. If the mail service on the destination is not available, the
destination host returns a "421 Service Not Available" reply in step 2
and the process is terminated.
Mail transfer :
• Once the connection has been established, the SMTP sender may
send one or more messages to the SMTP receiver.
• • There are three logical phases to the transfer of a message :
• 1. A MAIL command identifies the originator of the message.
• 2. One or more RCPT commands identify the recipients of this
message.
• 3. A DATA command transfers the message text.
Connection termination :
• • The SMTP sender closes the connection in the following manner:
• 1. The sender sends a QUIT command and waits for a reply.
• 2. Sender initiates TCP close operation for the TCP connection.
• 3. The receiver initiates its TCP close after sending is reply to the
QUIT command.
Working of SMTP :
• SMTP is a simple ASCII protocol that is based on client-
server model.
• After establishing the TCP connection, the sending
machine, operating as the client, waits for the receiving
machine, operating as the server, to talk first.
• The server starts by sending a line of text giving its
identity and telling whether or not it is prepared to
receive mail.
• If it is not, the client releases the connection and tries
again later.
…..Continue
• If the server is willing to accept e-mail, the client
announces whom the e-mail is coming from and
destination, the server gives the client the go ahead to
send the message.
• Then the client sends the message and the server
acknowledges it.
The problems that may arise with SMTP protocol are
as follows:
• Some older version of SMTP implementations cannot
handle messages exceeding 64KB.
• If the client and server have different timeouts, one of
them may give up while the other is still busy,
unexpectedly terminating the connection.
• To get around these problems, extended SMTP
(ESMTP) has been defined in RFC 1425.
Commands are listed in table
Keywword Argument(s)
HELO Sender’s host name
MAIL FROM Sender of the message
RCPT NO Intended recipient of the message
DATA Body of the mail
QUIT
RESET
VRFY Name of recipients to be verified
NOOP
EXPN Mailing list to be expanded
HELP Command name
SEND FROM Intended recipients of the message
SMTP Process :
• Contact server on well known port
• ASCII oriented command/response
• methodology
– contact server
– wait for greeting
– send HELO
– wait for response
– send command
– wait for response
– repeat last two
Commands
• HELP
– identifies the client to the server, fully qualified domain name,
only sent once per session
• MAIL
– initiate a message transfer, fully qualified domain of originator
• RCPT
– follows MAIL, identifies an addressee, typically the fully qualified
name of the addressee
– for multiple addressees use one RCPT for each addressee
• DATA
– send data line by line
– <cr>.<cr> tells server data transfer is over
Commands
• RSET
– tells server to abort current message and clear all of it buffers
– same state as after HELO
• SEND , SOML , SAML
– like MAIL, outdated not used any more
• VRFY
– ask server to verify a user name
– server replies positively of it knows user, negatively if not
• EXPN
– ask server to confirm mailing list alias
– server reply is multi-line, one per user
Commands
• HELP
– ask server for help
• by itself get a list of server supported commands
• <string> get help for that command
• NOOP
– ask server to respond with a positive reply
• QUIT
– tell server that client is ending session
– server replies positively and closes connection
• TURN
– reverse roles of client and server
• outdated, rarely used on modern internet
SMTP Simple Mail Transfer Protocol

More Related Content

What's hot

Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
Phan Vuong
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
rahul kundu
 

What's hot (20)

Mime
MimeMime
Mime
 
Simple mail transfer protocol
Simple mail transfer protocolSimple mail transfer protocol
Simple mail transfer protocol
 
SNMP/SMTP/MIME
SNMP/SMTP/MIMESNMP/SMTP/MIME
SNMP/SMTP/MIME
 
E mail flow
E mail flowE mail flow
E mail flow
 
Application Layer
Application Layer Application Layer
Application Layer
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Mail server
Mail serverMail server
Mail server
 
Smtp, pop3, imapv 4
Smtp, pop3, imapv 4Smtp, pop3, imapv 4
Smtp, pop3, imapv 4
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
POP3 Post Office Protocol
POP3 Post Office ProtocolPOP3 Post Office Protocol
POP3 Post Office Protocol
 
Electronic mail
Electronic mailElectronic mail
Electronic mail
 
Email
EmailEmail
Email
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
 
5. icmp
5. icmp5. icmp
5. icmp
 
Email and DNS
Email and DNSEmail and DNS
Email and DNS
 
File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication header
 

Similar to SMTP Simple Mail Transfer Protocol

E-Mail - Technical Overview
E-Mail - Technical OverviewE-Mail - Technical Overview
E-Mail - Technical Overview
Venkatesh Iyer
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
Bố Su
 

Similar to SMTP Simple Mail Transfer Protocol (20)

SMTP(simple mail transfer protocol).ppsx
SMTP(simple mail transfer protocol).ppsxSMTP(simple mail transfer protocol).ppsx
SMTP(simple mail transfer protocol).ppsx
 
window server 2008 mail configuration
window server 2008 mail configurationwindow server 2008 mail configuration
window server 2008 mail configuration
 
retrieving the mail
retrieving the mailretrieving the mail
retrieving the mail
 
Mail services
Mail servicesMail services
Mail services
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Unit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITUnit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - IT
 
Computer networks unit v
Computer networks    unit vComputer networks    unit v
Computer networks unit v
 
how email works
how email workshow email works
how email works
 
12 - E-Mail.ppt
12 - E-Mail.ppt12 - E-Mail.ppt
12 - E-Mail.ppt
 
12 - E-Mail.ppt
12 - E-Mail.ppt12 - E-Mail.ppt
12 - E-Mail.ppt
 
E-Mail - Technical Overview
E-Mail - Technical OverviewE-Mail - Technical Overview
E-Mail - Technical Overview
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
 
How Email Works
How Email WorksHow Email Works
How Email Works
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
Electronic Mail
Electronic MailElectronic Mail
Electronic Mail
 
Electronic mail protocols and operations
 Electronic mail protocols and operations Electronic mail protocols and operations
Electronic mail protocols and operations
 
Client server examples for tcp abnormal conditions
Client server examples for tcp abnormal conditionsClient server examples for tcp abnormal conditions
Client server examples for tcp abnormal conditions
 
Mail server
Mail serverMail server
Mail server
 
Topic 2.4 network services
Topic 2.4 network servicesTopic 2.4 network services
Topic 2.4 network services
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 

SMTP Simple Mail Transfer Protocol

  • 1.
  • 2. SMTP INTRADUCTION : • It is a TCP/IP protocol that specifies how computers exchange electronic mail. • It works with post office protocol (POP). • SMTP stands for Simple Mail Protocol • The actual mail transfer is done through messgae transfer agents • To send mail, a system must have the client MTA & to receive mail, a system must have a server MTA • The formal protocol that defines the MTA client & server in the Internet is called the simple mail transfer protocol
  • 3. Continue…… • As we said before two pairs of MTA clients / server program are used in most common situation • Fig : SMTP range
  • 4. Continue…. • SMTP is used two times , between the sender & the sender’s mail server and between the two servers. • SMTP simply define how command & response must be back & forth. Each network is free to choose a software package for implementation
  • 5. Basic SMTP ArchitectureBasic SMTP Architecture • SMTP clients and servers have two main components: 1.User Agents (UA): • It prepares a message and encloses in an envelope. 2.Mail Transfer Agents (MTA): • It transfers the mail across the internet.
  • 6. Commands and Responses : • SMTP uses commands & response to transfer message between on MTA client & in MTA server • Each commands or reply is terminated by a two character (carriage return & line feed) end-of-line token
  • 7. Commands format : • Command are sent from the client to the server. • It is consist of a keyword by zero/more arguments SMTP defines 14 commands. • It means some keywords do not contain any argument. • The first five are mandatory; every implemenatation must support these five commands. • The next three are aften used & highly recommended. The last six are seldom used Keyword : argument(s)
  • 8. SMTP Responses : • • SMTP responses are sent from server to client. • • Each response begins with a three digit code and may be followed by additional textual information. • • The leading digits indicate the category of the response.
  • 9. The difference categories of response are: 1. Positive completion reply. It indicates that the requested action has been successfully completed. A new request may be initiated. • 2. Positive Intermediate reply. It indicates that the command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. • 3. Transient Negative Completion reply. It indicates that the command was not accepted and the requested action did not occur. However, the error condition is temporary and the action may be requested. • 4. Permanent Negative Completion reply. It indicates the command was not accepted and the requested action did not occur.
  • 10. Mail Transfer Phases The basic SMTP operation occurs in three phases: • 1. Connection set up • 2. Mail transfer • 3. Connection termination • Connection Setup: • An SMTP sender will attempt to set up a TCP connection with a target host when it has one or more mail message to deliver to that host. The following sequence occurs during connection setup:
  • 11. ..…continue • 1. The sender opens a TCP connection with the receiver. • 2. Once the connection is established, the receiver identifies itself with '220 Service Ready". • 3. The sender identifies itself with the HELO command. • 4. The receiver accepts the sender's identification with "250 'OK". • 5. If the mail service on the destination is not available, the destination host returns a "421 Service Not Available" reply in step 2 and the process is terminated.
  • 12. Mail transfer : • Once the connection has been established, the SMTP sender may send one or more messages to the SMTP receiver. • • There are three logical phases to the transfer of a message : • 1. A MAIL command identifies the originator of the message. • 2. One or more RCPT commands identify the recipients of this message. • 3. A DATA command transfers the message text.
  • 13. Connection termination : • • The SMTP sender closes the connection in the following manner: • 1. The sender sends a QUIT command and waits for a reply. • 2. Sender initiates TCP close operation for the TCP connection. • 3. The receiver initiates its TCP close after sending is reply to the QUIT command.
  • 14. Working of SMTP : • SMTP is a simple ASCII protocol that is based on client- server model. • After establishing the TCP connection, the sending machine, operating as the client, waits for the receiving machine, operating as the server, to talk first. • The server starts by sending a line of text giving its identity and telling whether or not it is prepared to receive mail. • If it is not, the client releases the connection and tries again later.
  • 15. …..Continue • If the server is willing to accept e-mail, the client announces whom the e-mail is coming from and destination, the server gives the client the go ahead to send the message. • Then the client sends the message and the server acknowledges it.
  • 16. The problems that may arise with SMTP protocol are as follows: • Some older version of SMTP implementations cannot handle messages exceeding 64KB. • If the client and server have different timeouts, one of them may give up while the other is still busy, unexpectedly terminating the connection. • To get around these problems, extended SMTP (ESMTP) has been defined in RFC 1425.
  • 17. Commands are listed in table Keywword Argument(s) HELO Sender’s host name MAIL FROM Sender of the message RCPT NO Intended recipient of the message DATA Body of the mail QUIT RESET VRFY Name of recipients to be verified NOOP EXPN Mailing list to be expanded HELP Command name SEND FROM Intended recipients of the message
  • 18. SMTP Process : • Contact server on well known port • ASCII oriented command/response • methodology – contact server – wait for greeting – send HELO – wait for response – send command – wait for response – repeat last two
  • 19. Commands • HELP – identifies the client to the server, fully qualified domain name, only sent once per session • MAIL – initiate a message transfer, fully qualified domain of originator • RCPT – follows MAIL, identifies an addressee, typically the fully qualified name of the addressee – for multiple addressees use one RCPT for each addressee • DATA – send data line by line – <cr>.<cr> tells server data transfer is over
  • 20. Commands • RSET – tells server to abort current message and clear all of it buffers – same state as after HELO • SEND , SOML , SAML – like MAIL, outdated not used any more • VRFY – ask server to verify a user name – server replies positively of it knows user, negatively if not • EXPN – ask server to confirm mailing list alias – server reply is multi-line, one per user
  • 21. Commands • HELP – ask server for help • by itself get a list of server supported commands • <string> get help for that command • NOOP – ask server to respond with a positive reply • QUIT – tell server that client is ending session – server replies positively and closes connection • TURN – reverse roles of client and server • outdated, rarely used on modern internet