Email looks simple: write, send, receive. Behind it, several servers and DNS records cooperate, and modern authentication decides whether your message is trusted or filtered as spam. Here is the whole picture.
Key terms
- SMTP: the protocol for sending mail between servers and from your app to your server (ports 587 or 465).
- IMAP: reads mail while keeping it on the server, synced across devices (port 993).
- POP3: downloads mail to one device, usually deleting it from the server (port 995).
- MX record: tells the world which server receives mail for your domain.
The journey of an email
- You send from your mail app or webmail. The app hands the message to your outgoing server via SMTP, after logging in.
- Your server looks up the recipient domain's MX records in DNS.
- It connects to the recipient's mail server over SMTP and delivers the message.
- The receiving server checks the sender's authentication (SPF, DKIM, DMARC), reputation and content, then files it in the inbox or spam folder.
- The recipient reads it with IMAP, POP3 or webmail.
IMAP or POP3?
Use IMAP in almost every case: phone, laptop and webmail stay in sync, and messages are included in server backups. POP3 suits only a single device with very limited server space. Ports and settings: email ports and settings.
SPF, DKIM and DMARC
| Record | What it proves |
|---|---|
| SPF (TXT) | Which servers may send mail for your domain. |
| DKIM (TXT) | A digital signature showing the message was not altered and really came from your domain. |
DMARC (TXT at _dmarc) | What receivers should do when SPF/DKIM fail (none, quarantine, reject) and where to send reports. |
Large providers such as Gmail and Outlook now expect all three for reliable delivery. cPanel can create SPF and DKIM for you; see email authentication in cPanel.
Why mail lands in spam
- Missing or wrong SPF, DKIM or DMARC.
- Sending from a website script without authentication.
- Poor content or bulk mail without unsubscribe links.
- Server or domain reputation problems.
Fixes are in emails going to spam.
