Introduction
Email protocols are standardized communication rules that enable the reliable transmission and retrieval of electronic mail. These protocols define how email clients communicate with mail servers and how mail servers exchange messages. The three primary email protocols—POP3, IMAP, and SMTP—each serve distinct purposes in the email ecosystem, handling retrieval, synchronization, and transmission respectively.
Key Points:
- POP3 & IMAP are used for retrieving mail from a server (client-to-server)
- SMTP is used for sending mail between clients and servers, and between servers
- Understanding these protocols is essential for configuring email clients and servers
What is Email Protocols?
Types of Email Protocols
- POP3 — Post Office Protocol version 3 (downloads mail to local device)
- IMAP — Internet Message Access Protocol (syncs mail across devices)
- SMTP — Simple Mail Transfer Protocol (sending mail between servers/clients)
Quick Reference Card
POP3
Port: 110 / 995 (SSL)
Use: Download & delete
IMAP
Port: 143 / 993 (SSL)
Use: Sync & organize
SMTP
Port: 25 / 587 / 465
Use: Send mail
POP3 Commands
Common POP3 commands for downloading and managing mail:
| Command | Description |
|---|---|
USER <name> |
Specify username for authentication |
PASS <password> |
Specify password for authentication |
STAT |
Display mailbox status (message count and size) |
LIST [msg] |
List message numbers and sizes |
RETR <msg> |
Retrieve a specific message |
DELE <msg> |
Mark a message for deletion |
RSET |
Unmark deleted messages |
QUIT |
End session and process deletions |
IMAP Commands
Common IMAP commands for syncing and organizing mail:
| Command | Description |
|---|---|
LOGIN <user> <password> |
Authenticate user |
SELECT <mailbox> |
Select a mailbox to access |
LIST <ref> <name> |
List available mailboxes |
FETCH <seq> <item> |
Retrieve specific message items |
STORE <seq> <item> <value> |
Modify message flags |
SEARCH <criteria> |
Search for messages by criteria |
CREATE <name> |
Create a new mailbox |
LOGOUT |
End IMAP session |
SMTP Commands
Common SMTP commands for sending and relaying mail:
| Command | Description |
|---|---|
EHLO <domain> |
Identify client and request server capabilities |
HELO <domain> |
Older version of EHLO |
AUTH <mechanism> |
Authenticate client credentials |
MAIL FROM: <address> |
Specify sender address |
RCPT TO: <address> |
Specify recipient address |
DATA |
Initiate message content transfer |
RESET |
Reset the current mail transaction |
QUIT |
Close SMTP connection |