A mail server consists of three main components:
- MTA (Mail Transfer Agent) — handles sending and forwarding emails via SMTP. Common software: Postfix, Exim, Sendmail, Exchange.
- MDA (Mail Delivery Agent) — delivers mail from MTA to user mailboxes. Common: Dovecot, Cyrus IMAP.
- MRA (Mail Retrieval Agent) — allows users to access mail via IMAP or POP3.
Additional components: mail queue system, anti-spam (SpamAssassin, RBL, Greylisting, DKIM/SPF/DMARC), TLS encryption, Webmail (Roundcube, Horde).
Common Protocols
| Protocol | Purpose | Default Port | SSL Port |
|---|---|---|---|
| SMTP | Sending | 25 | 465 |
| POP3 | Downloading | 110 | 995 |
| IMAP | Managing on server | 143 | 993 |
- SMTP (587) — client submission with TLS.
- POP3 — downloads and typically deletes mail from server; single-device use.
- IMAP — mail remains on server; multi-device access.