Email Flashcards

1
Q

Application architecture (Three major components) of Email

A
  • Mail servers
  • User Agents
  • “Simple Mail Transfer Protocol” (SMTP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Mail Servers

A
  • Composition of a mail server
    • Mailbox contains incoming messages for users
    • Message queue of outgoing (to be sent) mail messages
    • Messages are sent between mail servers using SMTP
  • Mail servers play both a “client” role and a “server” role
    • “Server” role: receive emails from an upstream server (or UA)
    • “Client” role: sending emails to a downstream server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

User Agent

A
  • “Mail reader”
  • Outlook, Thunderbird, iPhone mail client, etc.
  • Used to compose, edit, send, read… mail messages
  • Both outgoing and incoming messages are stored on the associated server, not on the UA itself
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Simple Mail Transfer Protocol [RFC 5321]

A
  • Principal application-layer protocol for Internet electronic mail
  • Older than HTTP!
  • RFC 5321 published in 1982, but SMTP was used before that too
  • Still in widespread use, despite its age
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SMTP archaic characteristics

A
  • Body must be simple 7-bit ASCII
  • This made sense in the 1980s when throughput was scarce
  • However, with the advent of the multimedia era, sending images, audio, etc. became more common
  • Binary multimedia data has to be encoded to ASCII before sending
    • Decoded on the receiver side too
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SMTP (Transport, Three phases of transfer,Command/response style)

A
  • Uses TCP to reliably transfer email message from mail server to mail server
    • Runs over TCP port 25
    • Direct transfer between sending server and receiving server
  • Three phases of transfer:
    • Handshake (greeting)
    • Transfer of messages
    • Close
  • Command/response style interaction (like HTTP)
    • Commands: ASCII text
    • Response: status code + text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Scenario:
Alice wants to send a message to Bob

A

1) Alice uses UA to compose message “to” bob@someschool.edu
2) Alice’s UA sends message to her mail server; message placed in message queue
3) Client side of SMTP opens TCP connection with Bob’s mail server
4) SMTP client sends Alice’s message over the TCP connection; let’s assume that Bob’s mail server queue is full and rejects the message
5) Alice’s mail server retries every 30 minutes until it’s successful; the message is eventually delivered
6) Bob’s mail server places the message in Bob’s mailbox
7) Bob invokes his user agent to read message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Intermediate Servers

A
  • Sending does not necessarily use intermediate mail servers
    • Even if the mail servers are on the other side of world
  • Example: Alice’s server is in Lancaster, Bob’s server is in New York: direct TCP connection between the two servers
  • If Bob’s mail server is not receiving additional messages, the message will remain on Alice’s mail server in Lancaster
    • It does not get placed in an intermediate server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Sample SMTP Interaction
Much like face-to-face communication!

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Comparison to HTTP

A
  • HTTP: pull
  • SMTP: push
  • Both have ASCII command/response interaction, status codes
  • HTTP: no format restrictions
  • SMTP: enforces 7-bit ASCII format
  • HTTP: each “object” is encapsulated in its own response message
  • SMTP: multiple objects sent in multipart message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Mail Message Format

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Mail Access Protocols

A

SMTP: delivery to receiver’s server
* Mail access protocol: subsequent retrieval from server
* POP: Post Office Protocol [RFC 1939]: authorisation, download
* IMAP: Internet Mail Access Protocol [RFC 1730]: more sophisticated, e.g. allows manipulation of stored messages on server
* HTTP: GMail, Hotmail, Yahoo! Mail, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

POP3 example

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

POP3 contd.

A
  • Previous example used “download and delete” mode
    • Bob cannot re-read e-mail if he changes client, as it has been deleted
  • “download-and-keep” mode allows copies of messages to be kept on different clients
  • POP3 is stateless across sessions
    • Simple protocol, but limited functionality
    • Still in widespread use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

IMAP

A
  • Can keep and manipulate all messages at the server
  • Allows users to organise messages in folders
    • With POP3 this would be achieved locally, on the client-side
    • However, IMAP allows this to be done remotely
  • Keeps user state across sessions:
    • Names of folders and mappings between message IDs and folder names
  • IMAP also allows parts of a message to be retrieved
    • Useful with low bandwidth connections
    • Avoid fetching attachments, for example
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Web-based Email

A
  • Increasingly popular…
    • As provided by Google (and others - e.g. Lancaster University)
  • Web browser acts as User Agent
    • When an email is accessed from a mailbox, it is retrieved using HTTP
  • Importantly, the mail servers still send and receive messages using SMTP
17
Q

SMTP: Final Words

A
  • SMTP uses persistent connections
  • SMTP requires message (header & body) to be in 7-bit ASCII
  • SMTP server uses CRLF.CRLF to determine end of message