Email travels through multiple components before reaching the recipient. The sender's Mail User Agent (MUA) uploads the message to the Mail Submission Agent (MSA), which verifies the password and hands it off to the Mail Transfer Agent (MTA). The MTA routes the message across servers using SMTP on port 25 to the receiving MTA.
Once received, the Local Delivery Agent (LDA) stores it until the recipient's MUA retrieves it via IMAP. This layered structure originated in the 1980s to handle unreliable networks and server downtime. MTAs retry delivery for up to five days with exponential backoff—starting at 5 minutes and increasing to one hour.
Modern email relies on SMTP, a text-based protocol requiring CRLF line endings. Servers respond with three-digit codes: 200 for success, 300 for continuation, 400 for temporary errors, and 500 for permanent failures. DNS MX records determine the correct mail server, with priority numbers guiding delivery.
Source: Hacker News · Summarized by HeadlinesBriefing