Email Protocols

[!NOTE] This module explores the core principles of Email Protocols, deriving solutions from first principles and hardware constraints to build world-class, production-ready expertise.

1. SMTP (Simple Mail Transfer Protocol)

SMTP is used for sending emails. It moves the email from the client to the server, and from one server to another.

  • Port: 25 (Legacy/Server-to-Server), 587 (Modern Submission with TLS).
  • Push Protocol: It “pushes” the data to the destination.

2. IMAP vs. POP3 (Receiving)

These protocols are used to retrieve emails from a mail server to a client.

Feature POP3 IMAP
Strategy Download and Delete Sync and Manage
Storage Stored on Device Stored on Server
Multi-device Poor (Hard to sync) Excellent (Same view on all)
Connection Disconnect after DL Always connected

IMAP (Internet Message Access Protocol) is the modern standard. It allows you to see the same folders and read/unread status on your phone, laptop, and tablet simultaneously.


3. Interactive: The Email Journey

Trace the hops.

👩‍💻
Alice
SMTP
Mail Server
IMAP
👨‍💼
Bob
Waiting...

4. Security (SPF, DKIM, DMARC)

Because SMTP was designed in the 80s, it has no built-in security.

  • SPF: “Only these IPs are allowed to send mail for my domain.”
  • DKIM: Digitally signs the email to prove it wasn’t tampered with.
  • DMARC: Tells the receiver what to do if SPF or DKIM fails (e.g., “Put in Spam”).