8.3Email and FTP
The idea
SMTP sends mail; POP3 and IMAP fetch it. FTP uses a control connection and a separate data connection. HTTP is stateless, while FTP and POP3 are stateful.
Think of it like this: SMTP is the postman delivering to your mailbox; POP3 or IMAP is you collecting from the box.
Why it exists
GATE asks which protocol pair sends and retrieves mail, or which protocols are stateful.
How it works
- Send: SMTP (TCP 25). Retrieve: POP3 (110) or IMAP (143).
- IMAP keeps mail on the server, POP3 usually downloads it.
- FTP: control on 21 (stays open), data on 20 (one per transfer).
- Stateful: FTP, POP3. Stateless: HTTP.
Worked example: Which pair sends and retrieves e-mail, in that order?
SMTP, POP3 (GATE 2019).
Now play with it
- →Read the table and pick the retrieval protocols.
- →Which port does FTP's data connection use?
| Protocol | Direction | Port | State | Notes |
|---|---|---|---|---|
| SMTP | client → server, server → server (send) | 25 | stateful commands | push protocol; MIME adds attachments |
| POP3 | server → client (retrieve) | 110 | stateful | usually downloads and deletes |
| IMAP | server → client (retrieve) | 143 | stateful | mail stays on server, folders |
| FTP | file transfer | 21 control, 20 data | stateful, 2 connections | control connection is persistent |
| HTTP | web | 80 | stateless | cookies add state |
To send then retrieve e-mail: SMTP then POP3 (or IMAP).
Check yourself
Which of these is a stateful application layer protocol?
Exam notes (the dense version)
SMTP (TCP 25) pushes mail from a client to a server and between servers. To retrieve mail use POP3 (TCP 110, downloads and usually deletes) or IMAP (TCP 143, keeps mail on the server, folders). MIME adds attachments and non-ASCII content to the mail format. FTP uses two TCP connections: control (port 21, persistent, stateful) and data (port 20, new for each file transfer). POP3 and FTP are stateful; HTTP is stateless.
Previous year questions: Application Layer: DNS, HTTP, Email (9)
PYQs are grouped by topic, so this is the full set for Application Layer: DNS, HTTP, Email; try the ones that match this subtopic. Open all 9 on the topic page.