Email & webmail

How email hosting works: SMTP, IMAP, POP3, MX, SPF, DKIM and DMARC

Follow an email from sender to inbox: SMTP and MX records, IMAP vs POP3, and how SPF, DKIM and DMARC prove your mail is genuine so it lands in the inbox, not spam.

BeginnerEveryone2 min read

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

  1. You send from your mail app or webmail. The app hands the message to your outgoing server via SMTP, after logging in.
  2. Your server looks up the recipient domain's MX records in DNS.
  3. It connects to the recipient's mail server over SMTP and delivers the message.
  4. The receiving server checks the sender's authentication (SPF, DKIM, DMARC), reputation and content, then files it in the inbox or spam folder.
  5. 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

RecordWhat 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.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.