Você está na página 1de 27

SMTP

1
E-Mail
 E-mail is non-real time application used for
sending a single message that includes text,
audio, video, voice or graphics to one or many
recipients.

 SMTP is the standard mechanism for e-mail in


the Internet which is used to handle incoming
and outgoing mails.

 Three ways to access e-mail are:


 Web based Mail (yahoo, rediffmail)
 Using Mail client (outlook and Netscape)
2
 Command Driven (mail)
E-Mail Architecture
 An E-mail system consists of two
subsystems:
 user agents allow users to read & send
E-mail
 Message transfer agents which move the
messages from the source to the
destination.

3
User Agent
 User agent provides various services such
as : composing , reading, replying,
forwarding messages and handling
mailboxes.

 A user agent creates two mailbox- inbox


and outbox.

4
Message Transfer Agent
 MTA moves messages from the source to
the destination. MTA are the system
programs running in the background.

 MTA checks the destination address and


transfer the mail to proper destination on
the network.

5
E-Mail Architecture
 E-mail system supports five basic
functions :
 Composition : create and reply
 Display : browse and read
 Transfer : Transfer
 Reporting: Notifications and
confirmation
 Disposition : delete or save

6
E-Mail Architecture
 Other Functions include
 Alternative recipient
 Encryption and decryption of data.
 Carbon copies and Blind carbon copy.
 Creating and destroying mailboxes to store
incoming e-mail.
 Sending a message to large number of uses.
 Forwarding messages to another persons
 Automatic notification of undelivered e-mails.

7
Message Formats
 Message Format consist of
 Message Envelope which contains
message, destination address, priority,
security level etc.
 Header carries the control information.
 Body contains the message contents.

8
RFC Standard
 RFC 822 is the standard which defines
various header fields which are:
 To
 CC
 BCC
 From
 Sender
 Received
 Return Path
 Date, Reply-To, Message-ID, References,
Keyword, Subject etc

9
RFC 822

10
RFC 822

11
MIME
 RFC 822 format is sufficient for text
messages in English and expressed in ASCII.

 MIME is a supplementary protocol that allow


non-ASCII data to be send through SMTP.

12
MIME
 Five new message headers are defined
for MIME –
 MIME-Version : (1.0)
 Content-Description
 Content-ID : Identifier
 Content-Transfer-Encoding : Method to
encode the message into ASCII form.
 Content-Type : (Type and subtype) : Type
of data

13
MIME

14
MIME

15
MIME
 RFC 1521 defines seven types with each type
has more subtypes.
 Text – Plain, Rich Text
 Image – gif, jpeg
 Audio – basic
 Video – mpeg
 Applications – Octet, Stream, Post-Script
 Message – RFC822, Partial, External, Body
 Multipart – Mixed, Alternative, Parallel, Digest

16
POP3
 POP3 is used to transfer e-mail from a mail
server to mail client. It provides commands for
the user to log in, log out, fetch messages and
delete messages. POP3 consist of ASCII text.

 POP3 sever maintains a collections of text files.


One for each e-mail account. When a message
arrives, POP3 server simply appends it to the
bottom of the recipient’s file. When user checks
e-mail, e-mail client connects to POP3 server
using port 110. POP3 server requires login name
and a password. Finally it opens your text file
and allows user to access it. 17
POP3
 The various commands which are used are
listed below. USER, PASS, QUIT, LIST, RETR,
DELE and TOP are used.

 E-mail client connects to POP3 server and


issues a series of commands to bring copies
of e-mail messages to your local machine.

 POP3 server can be seen as a interface


between e-mail client and the text file
containing the messages.

18
POP3

19
RFC 822 HEADERS

20
IMAP
 IMAP maintains a central repository which
can be accesses from any machine so IMAP
does not copy e-mail to the user’s personal
machine.

 An important feature is its ability to address


mail not by arrival number but by using
attributes. That means the mailbox is like a
relational database system than a linear
sequence of messages.

21
IMAP
 A user can check the mail header before
downloading.

 A user can search the contents of e-mail.

 A user can partially download the e-mail.

 A user can create, delete or rename


mailboxes on the mail server.

 A user can create a hierarchy of mailboxes in


a folder for e-mail storage. 22
DMSP
 This allows user to download e-mail from the
server to personnel machine and then
disconnect. It is possible to read and answer
the e-mail while disconnected. After
reconnecting e-mail is transferred.

 It also provides filters which consists of rules


which are checked when e-mail comes in.
Each rule specifies a condition and
corresponding action. Another facility is to
forward incoming e-mail to different
addresses.
23
Mailing List
 The mailing list contains e-mail ID of each
person along with his name. When a
message is sent to the mailing list, copies of
the message are delivered to everyone who is
on the list.

 Sender edits the message using his own mail


user agent (MUA). This is passed to mail
transport agent (MTA), which transfers it to
the host (MTA) which sends to the subscriber
MTA and local subscriber’s mail box.

24
SMTP
 SMTP is a simple ASCII protocol which
accepts the incoming connection and copy
messages from them into appropriate
mailboxes.

 The source machine establishes a connection


to port 25 of the destination machine to as to
deliver an e-mail. Once a TCP connection is
established, sending machine operates as a
client and the receiving machine acts as a
server. The client then waits for the server to
talk. 25
SMTP
 Server sends a line of text to give its identity
and announces its willingness to receive
mail. If the server is not prepared, client
releases the connection. But if the server is
ready or willing to accept e-mail, then the
client announces the sender of e-mail and its
recipient.

 If such a recipient exists at the destination,


then the server tells the client to send the
message. The client then sends the message
and the server ACK it. 26
SMTP Commands
 HELO introduce sender
 EHLP introduces sender and some extended
mode.
 MAIL FROM specifies the sender.
 DATA specifies the body of the message.
 RSET specifies the reset.
 RCTP command represents recipient. This
command can be used multiple times for
multiple recipients.
 Other commands are QUIT, HELP, VRFY
etc.
27

Você também pode gostar