SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)shashikant pabari
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocolasimnawaz54
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocolasimnawaz54
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer NetworksIIIT Manipur
 
Simple mail transfer protocol
Simple mail transfer protocolSimple mail transfer protocol
Simple mail transfer protocolAnagha Ghotkar
 
Simple Network Management Protocol
Simple Network Management ProtocolSimple Network Management Protocol
Simple Network Management ProtocolPrasenjit Gayen
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)Gurjot Singh
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)NetProtocol Xpert
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLVidhu Arora
 
Network address translation
Network address translationNetwork address translation
Network address translationVarsha Honde
 
Electronic mail - Computer Networks
Electronic mail - Computer NetworksElectronic mail - Computer Networks
Electronic mail - Computer NetworksUmme Jamal
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udprahul kundu
 

La actualidad más candente (20)

Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
Mail server
Mail serverMail server
Mail server
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocol
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
Simple mail transfer protocol
Simple mail transfer protocolSimple mail transfer protocol
Simple mail transfer protocol
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Simple Network Management Protocol
Simple Network Management ProtocolSimple Network Management Protocol
Simple Network Management Protocol
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
Presentation on arp protocol
Presentation on arp protocolPresentation on arp protocol
Presentation on arp protocol
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
 
Network address translation
Network address translationNetwork address translation
Network address translation
 
Dhcp
DhcpDhcp
Dhcp
 
Electronic mail - Computer Networks
Electronic mail - Computer NetworksElectronic mail - Computer Networks
Electronic mail - Computer Networks
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 

Similar a SMTP Simple Mail Transfer Protocol

SMTP(simple mail transfer protocol).ppsx
SMTP(simple mail transfer protocol).ppsxSMTP(simple mail transfer protocol).ppsx
SMTP(simple mail transfer protocol).ppsxanjubala996089
 
window server 2008 mail configuration
window server 2008 mail configurationwindow server 2008 mail configuration
window server 2008 mail configurationanwarkade1
 
retrieving the mail
retrieving the mailretrieving the mail
retrieving the mailtumetr1
 
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 - ITDeepraj Bhujel
 
Computer networks unit v
Computer networks    unit vComputer networks    unit v
Computer networks unit vJAIGANESH SEKAR
 
E-Mail - Technical Overview
E-Mail - Technical OverviewE-Mail - Technical Overview
E-Mail - Technical OverviewVenkatesh Iyer
 
10135 a 05
10135 a 0510135 a 05
10135 a 05Bố Su
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
Electronic mail protocols and operations
 Electronic mail protocols and operations Electronic mail protocols and operations
Electronic mail protocols and operationsVivekRajawat9
 
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 conditionsCEC Landran
 

Similar a 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
 
E mail flow
E mail flowE mail flow
E mail flow
 
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
 
Electronic mail
Electronic mailElectronic mail
Electronic mail
 
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
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
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).pptxEsquimalt MFRC
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

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