pop3 and imap protocol
DESCRIPTION
ppt about pop3 and imapTRANSCRIPT
![Page 1: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/1.jpg)
POP3 & IMAP
By:
Kusum Lata
Vikas Srivastava
Sandeep Goutele
Rohit Mishra
110/08/2010
POP3 & IMAP
![Page 2: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/2.jpg)
POP3 Post Office Protocol
(Version 3 )
210/08/2010POP3 & IMAP
![Page 3: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/3.jpg)
Introduction
What is POP ?
Why POP3 came into picture?
How it works?
10/08/2010 3POP3 & IMAP
![Page 4: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/4.jpg)
Terminology used…
User Agent: end-user mail program Message Transfer Agent: responsible
for communicating with remote hosts and transmitting/receiving email (both a client and server).
Mail Exchanger: host that takes care of email for a domain.
10/08/2010 4POP3 & IMAP
![Page 5: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/5.jpg)
5
POP3
protocol for receiving e-mail client/server protocol achieves transparent connection between
email server and e-mail client store-and-forward service listens on well-known port 110
10/08/2010POP3 & IMAP
![Page 6: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/6.jpg)
POP3 contd………….
Similar to SMTP command/reply lockstep protocol.
Used to retrieve mail for a single userrequires authentication
Commands and replies are ASCII lines.Replies start with “+OK” or “-ERR”.Replies may contain multiple lines.
10/08/2010 6POP3 & IMAP
![Page 7: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/7.jpg)
POP3 – Post Office Protocol
10/08/2010 7POP3 & IMAP
![Page 8: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/8.jpg)
to establish a TCP connection
810/08/2010 8POP3 & IMAP
![Page 9: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/9.jpg)
Contd………..
10/08/2010 9POP3 & IMAP
![Page 10: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/10.jpg)
Contd……
10/08/2010 10POP3 & IMAP
![Page 11: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/11.jpg)
POP-3 Commands USER - specify username PASS - specify password STAT - get mailbox status
number of messages in the mailbox. LIST - get a list of messages and
sizes.One per line, termination line contains
‘.’ only.RETR - retrieve a message
10/08/2010 POP3 & IMAP 11
![Page 12: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/12.jpg)
More POP-3 Commands
DELE - mark a message for deletion from the mailbox.
NOOP - send back positive reply RSET - reset. All deletion marks are
unmarked. QUIT - remove marked messages and
close the (TCP) connection.
10/08/2010 POP3 & IMAP 12
![Page 13: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/13.jpg)
Optional Commands
TOP - send header lines from messages.
APOP - alternative authenticationmessage digest based on opening
greeting sent from POP server.Requires shared secret!No cleartext password on the network.Does not authenticate the server!!!!
10/08/2010 POP3 & IMAP 13
![Page 14: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/14.jpg)
14
A Pop3 Exchange
> telnet monte pop3Trying 128.213.8.110...Connected to monte.cs.rpi.edu (128.213.8.110).Escape character is '^]'.+OK POP3 monte.cs.rpi.edu v7.59 server readyuser joe+OK User name accepted, password pleasepass joepw+OK Mailbox open, 1 messagesstat+OK 1 412list+OK Mailbox scan listing follows1 412.
14
![Page 15: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/15.jpg)
POP3 Proxy Platform for E-mail Filtering
What is spam? Spam filtering methods
access control method authentication method content based filtering method
05/19/2003 Internet message access protocol 15
![Page 16: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/16.jpg)
PEMF
PEMF achieves three design goals.
Universality Transparency High efficiency and stability
05/19/2003 Internet message access protocol 16
![Page 17: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/17.jpg)
Work flow of PEMF
05/19/2003 Internet message access protocol 17
![Page 18: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/18.jpg)
Advantages of POP3:
You can read your mail without being logged onto the Internet.
You may compose new messages to send to others without being logged onto the Internet.
Opening attachments is a quick and painless. There is not a maximum size on your mailbox. There is no advertising when you read your email All messages are stored on your hard drive
10/08/2010 POP3 & IMAP 18
![Page 19: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/19.jpg)
Disadvantages of POP3:
Opening attachments is a quick and painless process, unless the attachment has a virus payload in it.
If you have JavaScript enabled in your email reader, you might be target of rogue JavaScript embedded in an email.
All messages are stored on your hard drive eating up what is sometimes very valuable space..
10/08/2010 POP3 & IMAP 19
![Page 20: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/20.jpg)
Disadvantages contd………
Since all attachments are stored (downloaded) on your PC there is a potential danger of virus attack if they are not properly scanned by virus scanners.
Email folders can become corrupted and sometimes lost forever. Recovering is often a painful exercise.
10/08/2010 20POP3 & IMAP
![Page 21: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/21.jpg)
IMAP
Internet message access Protocol
2110/08/2010POP3 & IMAP
![Page 22: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/22.jpg)
10/08/2010 POP3 & IMAP 22
About IMAP
Internet message access protocol 1986, Stanford University Stands for accessing electronic mail that
are kept on a server access messages from more than one
computer More than one user Imap protocol based on a TCP connection
(port 143) No functionality to send messages (realized
with SMTP)
![Page 23: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/23.jpg)
POP V/s IMAP
05/19/2003 POP3 & IMAP 23
![Page 24: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/24.jpg)
Advantages over POP
Built in extension mechanism Multiple clients connected
simultaneous to the same mailbox Access to MIME Message State Information Multiple mailbox on the server Server Aid searches
05/19/2003 POP3 & IMAP 24
![Page 25: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/25.jpg)
10/08/2010 POP3 & IMAP 25
Procedure of the imap protocol
All emails are kept on a mail server Functionality:
Treat as local directory work directly on server copy delete different folders
download message headers and later on the full messages
![Page 26: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/26.jpg)
10/08/2010 POP3 & IMAP 26
Procedure of the imap protocol [2]
communication procedure:Connection initializationWelcome of the serverInteraction between client and serverConnection closed
![Page 27: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/27.jpg)
10/08/2010 POP3 & IMAP 27
Interaction between client and server
Client sends data - server receives: client-command begins with alphanumeric string
(‘tag’) e.g. A001 which is created for every new command
then the command with corresponding arguments follows
Server sends data – client receives Server receives and works with the command Returns the same tag with a state (OK/NO/BAD) Additional information begin with ‘*’ (untagged) Untagged in formation can be sent at every time
![Page 28: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/28.jpg)
10/08/2010 POP3 & IMAP 28
Different states of an imap session
Most commands are only valid in special states (otherwise: protocol error)
4 states (initialization is not an own state) Non-Authenticated Authenticated Selected Logout, Closed
![Page 29: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/29.jpg)
10/08/2010 POP3 & IMAP 29
State diagram
Reject con.
Initialization
Non-Authenticated
Authenticated
Selected
Logout,
Clo
se
Logout
Logout
Logout
Preauth
Select Close
Login
Connect
![Page 30: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/30.jpg)
10/08/2010 POP3 & IMAP 30
Flags message attributes
List of token associated with the message that is sent by the server
A flag can be permanent or session-only types:
System flag:• flag name that is pre-defined in the imap
specification • All system flags begin with ‘\’
Keywords:• A keyword is defined by the server implementation• Keywords do not begin with ‘\’
![Page 31: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/31.jpg)
10/08/2010 POP3 & IMAP 31
Flags Message Attributes [2]
\Seen (Message has been read) \Answered (Message has been answered) \Flagged (Message is "flagged" for
urgent/special attention) \Deleted (Message is "deleted" for removal by
later EXPUNGE) \Draft (Message has not completed
composition (marked as a draft)) \Recent (Message is "recently" arrived in this
mailbox. This session is the first session to have been notified about this message)
![Page 32: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/32.jpg)
10/08/2010 POP3 & IMAP 32
Commands
LOGIN username password SELECT mailbox-name CREATE new-mailbox-name DELETE mailbox-name RENAME old-name new-name AUTHENTICATE CLOSE SEARCH COPY
![Page 33: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/33.jpg)
10/08/2010 POP3 & IMAP 33
Imap sessionS: * OK IMAP4rev1 Service ReadyC: a001 login rohit zealousS: a001 OK LOGIN completedC: a002 select inboxS: * 18 EXISTSS: * FLAGS(\Answered\Flagged\Deleted\Seen\Draft)S: * 2 RECENTS: * OK [UNSEEN 17] Message 17 is the first unseen
messageS: * OK [UIDVALIDITY 3857529045] UIDs validS: a002 OK [READ-WRITE] SELECT completedC: a003 fetch 12 body[header]S: * 12 FETCH (BODY[HEADER] {350}S: Date: Wed, 11 August 2010 02:23:25 -0700 (PDT)S: From: rohit <[email protected]>S: Subject: weekend planning
![Page 34: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/34.jpg)
10/08/2010 POP3 & IMAP 34
Imap session [2]
S: To: rahul <[email protected]>S: cc: bharat <[email protected]>S: Message-Id: <[email protected]>S: MIME-Version: 1.0S: Content-Type: TEXT/PLAIN; CHARSET=US-ASCIIS:S: )S: a003 OK FETCH completedC: a004 store 12 +flags \deletedS: * 12 FETCH (FLAGS (\Seen \Deleted))S: a004 OK +FLAGS completedC: a005 logoutS: * BYE IMAP4rev1 server terminating connectionS: a005 OK LOGOUT completed
![Page 35: pop3 and imap protocol](https://reader033.vdocuments.site/reader033/viewer/2022061316/5552ed0eb4c90587048b4796/html5/thumbnails/35.jpg)
10/08/2010 POP3 & IMAP 35
Thank you for your attention!