SyntaxPilot
Courses/Cybersecurity Fundamentals/Lesson 71
Video coming soonThis lesson’s video is being made

Start with the notes below; the video appears here as soon as it is on YouTube.

Cybersecurity Fundamentals · Lesson 71 of 90

Email security

SMTP basicsemail spoofingSPFDKIMDMARC (policies none/quarantine/reject)DMARC reportsARCBIMIMTA-STSTLS-RPTsecure email gatewaysattachment sandboxinglink rewritingS/MIME

These are the notes for Cybersecurity Fundamentals (defensive), episode 71. The most common way attacks still arrive is an email that pretends to come from someone you trust. Email was designed when everyone on the network trusted each other, so the protocol itself never checks who the sender is. This episode builds email security step by step: why faking a sender is easy, how a domain lists its sending servers (SPF), signs its messages (DKIM) and ties both to the address the reader sees (DMARC), how forwarded mail survives (ARC), the logo reward (BIMI), keeping mail encrypted on its journey (MTA-STS, TLS-RPT, S/MIME), filtering dangerous content (gateways, sandboxing, link rewriting), and the human controls for when a perfectly authenticated email is still a fraud (BEC). Every term is defined the first time it appears; the Glossary collects them.

Scope. Defensive and educational only. Every program is a toy simulation; every domain is a reserved .example name and every IP address is from the documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24). Samples were run on 14 Nov 2026 in the SyntaxPilot compiler (Python 3).

The fake CEO email

Real-life example: Friday, 4:55 pm. An email "from the CEO" tells Neha in accounts to pay a supplier urgently. The From line says ceo@chai.example. She pays Rs 4,80,000. The CEO never wrote it.

  • Email spoofing: sending mail that claims to come from an address you don't own.
  • Email authentication: the checks that let a receiver confirm which domain really sent a message.
  • Domain: a name like chai.example that an organisation controls in DNS.

Step 1: SMTP, and why spoofing is easy

Demo 1: a toy SMTP conversation

# SMTP, the protocol that moves email: the sender simply TYPES who it is.
session = [
    ("client", "HELO mail.evil.example"),
    ("server", "250 Hello"),
    ("client", "MAIL FROM:<ceo@chai.example>"),      # envelope sender: not checked
    ("server", "250 OK"),
    ("client", "RCPT TO:<accounts@chai.example>"),
    ("server", "250 OK"),
    ("client", "DATA  From: CEO <ceo@chai.example>"),  # header sender: not checked
    ("server", "250 Message accepted for delivery"),
]
for who, line in session:
    print(f"{who:6} > {line}")

Real output:

client > HELO mail.evil.example
server > 250 Hello
client > MAIL FROM:<ceo@chai.example>
server > 250 OK
client > RCPT TO:<accounts@chai.example>
server > 250 OK
client > DATA  From: CEO <ceo@chai.example>
server > 250 Message accepted for delivery
  • SMTP (Simple Mail Transfer Protocol): the protocol mail servers use to hand messages to each other. Commands like HELO, MAIL FROM, RCPT TO and DATA; replies are numbered codes such as 250 OK.
  • Mail server / MTA (mail transfer agent): a server that sends and receives mail for a domain.
  • Envelope sender (MAIL FROM, also called return-path): where bounces go; hidden from the reader.
  • Header From (From:, the RFC 5322 From): the address the reader sees in the inbox.
  • SMTP checks neither. The sender simply types who it is. Everything below exists to fix that.

Step 2: SPF, which servers may send

Demo 2: SPF checks the sending IP

# SPF: the domain publishes which servers may send its mail. Receivers check the sending IP.
DNS = {"chai.example": "v=spf1 ip4:203.0.113.10 ip4:203.0.113.11 -all",
       "evil.example": "v=spf1 ip4:198.51.100.66 -all"}

def spf(envelope_domain, ip):
    rule = DNS.get(envelope_domain, "")
    allowed = [p[4:] for p in rule.split() if p.startswith("ip4:")]
    return "pass" if ip in allowed else "FAIL"

mails = [("real CEO mail      ", "chai.example", "203.0.113.10"),
         ("spoof, same domain ", "chai.example", "198.51.100.66"),
         ("spoof, own envelope", "evil.example", "198.51.100.66")]
for name, env, ip in mails:
    print(f"{name}  SPF {spf(env, ip)} for {env:12}  shows ceo@chai.example")

Real output:

real CEO mail        SPF pass for chai.example  shows ceo@chai.example
spoof, same domain   SPF FAIL for chai.example  shows ceo@chai.example
spoof, own envelope  SPF pass for evil.example  shows ceo@chai.example
  • SPF (Sender Policy Framework): the domain publishes a DNS TXT record (episode 20) listing the servers allowed to send its mail, such as v=spf1 ip4:203.0.113.10 include:_spf.mailer.example -all. The receiver compares the connecting server's IP with that list.
  • Mechanisms: ip4:/ip6: (addresses), include: (another domain's list), a, mx, and -all (everything else fails) or ~all (soft fail).
  • SPF's gap: it checks only the envelope domain. In line three the spoofer uses their own envelope domain, SPF passes for evil.example, and the reader still sees ceo@chai.example.
  • 10-lookup limit (RFC 7208, section 4.6.4): an SPF policy may need at most 10 terms that cause DNS lookups (include, a, mx, ptr, exists, redirect). More gives a permerror (permanent error), which fails SPF.
  • SPF also breaks under forwarding: the forwarder's IP isn't on the original domain's list.

Step 3: DKIM, signing the message

Demo 3: sign, then edit the body

# DKIM: the sending domain signs the headers and body. The public key is in DNS.
import hmac, hashlib
PRIVATE = b"chai.example signing key"          # toy: a keyed hash stands in for RSA / Ed25519
def sig(headers, body): return hmac.new(PRIVATE, (headers + body).encode(), hashlib.sha256).hexdigest()[:16]

headers = "From: ceo@chai.example | Subject: Q3 bonus"
body = "Bonuses are paid on 30 Nov."
dkim = {"d": "chai.example", "s": "mail2026", "b": sig(headers, body)}
print("DKIM-Signature: d=%s; s=%s; b=%s" % (dkim["d"], dkim["s"], dkim["b"]))
print("key lookup    :", f"{dkim['s']}._domainkey.{dkim['d']}")

def verify(h, b): return "pass" if sig(h, b) == dkim["b"] else "FAIL (changed after signing)"
print("as sent       :", verify(headers, body))
print("body edited   :", verify(headers, "Bonuses are paid to account 4411 on 30 Nov."))

Real output:

DKIM-Signature: d=chai.example; s=mail2026; b=6df5340b17d5c72a
key lookup    : mail2026._domainkey.chai.example
as sent       : pass
body edited   : FAIL (changed after signing)
  • DKIM (DomainKeys Identified Mail): the sending domain signs selected headers and the body with a private key (signatures, episode 16) and publishes the public key in DNS.
  • DKIM-Signature tags: d= signing domain (used for DMARC alignment), s= selector (which key), h= list of signed headers, bh= body hash, b= the signature.
  • Selector: a label that lets a domain have several keys; the public key is found at <selector>._domainkey.<domain>.
  • DKIM survives forwarding as long as the signed parts aren't changed. (The toy uses an HMAC; real DKIM uses RSA or Ed25519.)
  • DKIM's gap: a spoofer can sign perfectly with their own domain. DKIM alone says nothing about the From the reader sees.

Step 4: DMARC, checking what the reader sees

Demo 4: alignment and policy

# DMARC: SPF or DKIM must PASS for the domain the reader SEES in From:. Then apply the policy.
RECORD = "v=DMARC1; p=reject; rua=mailto:dmarc@chai.example"     # at _dmarc.chai.example
policy = dict(kv.split("=") for kv in RECORD.replace(" ", "").split(";"))["p"]

mails = [  # (label, From: domain, SPF result + its domain, DKIM result + its domain)
    ("real CEO mail",       "chai.example", ("pass", "chai.example"), ("pass", "chai.example")),
    ("spoof, own envelope", "chai.example", ("pass", "evil.example"), ("none", "")),
    ("newsletter tool",     "chai.example", ("pass", "mailer.example"), ("pass", "chai.example")),
]
for label, frm, spf, dkim in mails:
    aligned = any(res == "pass" and dom == frm for res, dom in (spf, dkim))
    verdict = "deliver" if aligned else policy
    print(f"{label:20} aligned pass: {str(aligned):5} -> {verdict}")

Real output:

real CEO mail        aligned pass: True  -> deliver
spoof, own envelope  aligned pass: False -> reject
newsletter tool      aligned pass: True  -> deliver
  • DMARC (Domain-based Message Authentication, Reporting and Conformance): a message passes only if SPF or DKIM passes for a domain that matches the header From domain, and the domain owner publishes what to do with failures.
  • Alignment: the match between the From domain and the SPF (envelope) or DKIM (d=) domain. The newsletter tool passes because its DKIM d= is chai.example.
  • Record: a TXT record at _dmarc.<domain> such as v=DMARC1; p=reject; rua=mailto:dmarc@chai.example.
  • Policy p=: none (monitor and report only), quarantine (treat as suspicious, usually the spam folder), reject (refuse the message).
  • Standards: DMARC was described in RFC 7489. In May 2026 the IETF published DMARCbis: RFC 9989 (the protocol), RFC 9990 (aggregate reporting) and RFC 9991 (failure reporting), replacing RFC 7489. Records still start v=DMARC1; pct becomes historic; new tags include t=y (testing) and np (policy for non-existent subdomains).

Demo 5: reading aggregate reports before enforcing

# A DMARC aggregate report (rua): who sent mail claiming to be chai.example yesterday?
rows = [  # (source IP, messages, DMARC result) from receivers' daily XML reports
    ("203.0.113.10",  1840, "pass"),     # our own mail server
    ("192.0.2.25",     310, "fail"),     # the billing tool nobody set up!
    ("198.51.100.66",   95, "fail"),     # a spoofer
]
for ip, n, result in rows:
    print(f"{ip:15} {n:5} messages  DMARC {result}")
fails = sum(n for _, n, r in rows if r == "fail")
print(f"failing: {fails} messages")
print("1) authenticate the billing tool  2) p=none -> quarantine -> reject")

Real output:

203.0.113.10     1840 messages  DMARC pass
192.0.2.25        310 messages  DMARC fail
198.51.100.66      95 messages  DMARC fail
failing: 405 messages
1) authenticate the billing tool  2) p=none -> quarantine -> reject
  • Aggregate report (rua): daily, machine-readable XML summaries from receivers: sending IPs, SPF and DKIM results, alignment and message counts.
  • Failure report (ruf): per-message reports; optional and rarely sent because of privacy.
  • Rollout: p=none → read reports → authenticate every legitimate sender (the billing tool) → quarantine → reject. Turning on reject first would block your own invoices.

Demo 6: ARC for forwarded mail

# Forwarding: a mailing list adds a footer and re-sends. SPF and DKIM break. ARC remembers.
def dmarc(spf, dkim): return "pass" if spf or dkim else "FAIL"

# at the list server: the original mail passed
original = {"spf": True, "dkim": True}
arc_seal = {"sealed_by": "lists.college.example", "original_result": dmarc(**original)}

# at the final inbox: new sending IP (SPF breaks), footer added (DKIM breaks)
spf_now, dkim_now = False, False
TRUSTED_FORWARDERS = {"lists.college.example"}
print("DMARC now           :", dmarc(spf_now, dkim_now))
if arc_seal["sealed_by"] in TRUSTED_FORWARDERS:
    print("ARC chain says      :", arc_seal["original_result"], "at", arc_seal["sealed_by"])
    print("decision            : deliver (trusted forwarder vouched for it)")

Real output:

DMARC now           : FAIL
ARC chain says      : pass at lists.college.example
decision            : deliver (trusted forwarder vouched for it)
  • Forwarding problem: a mailing list re-sends from its own IP (SPF breaks) and adds a footer (DKIM breaks), so genuine mail fails DMARC.
  • ARC (Authenticated Received Chain, RFC 8617, published July 2019): each handler records the authentication results it saw, signs ("seals") them and attaches them, building a chain across every hop. A receiver that trusts a forwarder can honour the original result.
  • Trusted forwarder: a forwarder the receiver has decided to believe; ARC is only as good as that trust.

BIMI

  • BIMI (Brand Indicators for Message Identification): supporting mail apps show the sender's logo next to authenticated mail. Record at default._bimi.<domain> (v=BIMI1).
  • The IETF guidance draft (an Internet-Draft, May 2026) says BIMI needs strong DMARC: p=quarantine applied to 100% of mail, or p=reject, on the organisational domain.
  • VMC (Verified Mark Certificate): a certificate proving the logo is the organisation's registered mark, verified back to a Mark Verifying Authority.
  • A logo means authenticated, not honest.

Step 5: encrypting the journey

Demo 7: STARTTLS stripping and MTA-STS

# STARTTLS stripping: someone on the path deletes the server's offer to encrypt.
def send(server_offers_tls, policy_mode):
    if server_offers_tls:
        return "sent over TLS"
    if policy_mode == "enforce":
        return "NOT SENT: TLS required (failure goes in the TLS-RPT report)"
    return "sent in PLAIN TEXT (anyone on the path can read it)"

# the attacker strips "250-STARTTLS" from the server's reply
print("no policy     :", send(server_offers_tls=False, policy_mode=None))
print("MTA-STS on    :", send(server_offers_tls=False, policy_mode="enforce"))
print("normal day    :", send(server_offers_tls=True,  policy_mode="enforce"))

Real output:

no policy     : sent in PLAIN TEXT (anyone on the path can read it)
MTA-STS on    : NOT SENT: TLS required (failure goes in the TLS-RPT report)
normal day    : sent over TLS
  • STARTTLS: an SMTP command where the receiving server offers to upgrade the connection to TLS (episode 22). The offer itself travels in plain text.
  • STARTTLS stripping (a downgrade attack): someone on the path deletes the offer, and the sender falls back to unencrypted delivery.
  • MTA-STS (Mail Transfer Agent Strict Transport Security): like HSTS for mail. A TXT record at _mta-sts.<domain> announces a policy; the policy file at https://mta-sts.<domain>/.well-known/mta-sts.txt lists the allowed MX hosts, the mode (testing, enforce, none) and max_age (how long senders cache it). In enforce mode, supporting senders refuse to deliver without authenticated TLS.
  • TLS-RPT (SMTP TLS Reporting): a TXT record at _smtp._tls.<domain> with rua=mailto:...; senders mail daily JSON reports of TLS successes and failures.
  • MX record: the DNS record naming a domain's incoming mail servers.

S/MIME, end to end

  • TLS and MTA-STS protect each hop; the message is still readable on every server it passes through.
  • S/MIME (Secure/Multipurpose Internet Mail Extensions): the sender signs with their private key (proves the person and integrity) and encrypts with the reader's public key (only the reader can open it). Each person needs a certificate from a PKI (episode 16).
  • End-to-end encryption: only the sender and the intended reader can read the content.

Step 6: dangerous content and fraudulent requests

Demo 8: a secure email gateway

# A secure email gateway checks every message before the inbox: auth, attachments, links.
def sandbox(attachment):                     # open it in a throwaway machine and WATCH
    behaviour = {"invoice.pdf": [], "invoice.docm": ["macro runs", "starts powershell"]}
    return behaviour.get(attachment, [])

def rewrite(url): return "https://scan.gw.example/?u=" + url.split("/")[2]

mail = {"dmarc": "pass", "attachments": ["invoice.pdf", "invoice.docm"],
        "links": ["https://pay-chai-portal.example/login"]}
print("DMARC          :", mail["dmarc"])
for a in mail["attachments"]:
    seen = sandbox(a)
    print(f"attachment     : {a:13} ->", "BLOCKED: " + ", ".join(seen) if seen else "clean")
for u in mail["links"]:
    print("link rewritten :", rewrite(u))
    print("                 (the gateway checks it again when it is clicked)")

Real output:

DMARC          : pass
attachment     : invoice.pdf   -> clean
attachment     : invoice.docm  -> BLOCKED: macro runs, starts powershell
link rewritten : https://scan.gw.example/?u=pay-chai-portal.example
                 (the gateway checks it again when it is clicked)
  • Secure email gateway (SEG): a filter in front of the mailboxes that checks authentication results, spam, malware and phishing for every message.
  • Attachment sandboxing: opening attachments in an isolated, throwaway machine and watching what they do (like the EDR behaviour rules of episode 69).
  • Macro: a small program inside an Office document; malicious macros often start a script shell like PowerShell.
  • Link rewriting (time-of-click protection): links are rewritten to pass through the gateway, so they are checked again when clicked; a link can be clean at delivery and malicious an hour later.

Demo 9: BEC and out-of-band verification

# Business email compromise: "Please pay the new account today." The email PASSES every check.
request = {"from": "accounts@supplier-chai.example", "dmarc": "pass",
           "text": "Our bank changed. Pay Rs 4,80,000 to account 9988 today."}
KNOWN_PHONE = {"supplier-chai.example": "+91-20-5550-0101"}   # from the contract, not the email

def handle(req, call_back):
    if "bank changed" in req["text"].lower() or "account" in req["text"].lower():
        domain = req["from"].split("@")[1]
        answer = call_back(KNOWN_PHONE[domain])
        return "pay" if answer == "yes, we changed it" else "STOP: report to security"
    return "pay"

print("DMARC:", request["dmarc"], "| request:", request["text"][:36], "...")
print("call-back to the known number ->", handle(request, lambda phone: "no, we never sent that"))

Real output:

DMARC: pass | request: Our bank changed. Pay Rs 4,80,000 to ...
call-back to the known number -> STOP: report to security
  • BEC (business email compromise, episode 6): fraud where an attacker uses a compromised real mailbox or a look-alike domain to request payments or bank-detail changes. The mail can pass SPF, DKIM and DMARC.
  • Out-of-band verification: confirming a request through a separate channel you already trust (a phone number from the contract, not from the email).
  • Other BEC controls: two-person approval for large payments, an "external sender" banner, alerts for look-alike domains, and MFA on mailboxes so they are harder to take over.

The whole chain

  1. SMTP lets anyone type a sender → spoofing.
  2. Which servers may send → SPF (10-lookup limit, breaks on forwarding).
  3. Was the message changed → DKIM (d=, s=, _domainkey).
  4. Does it match the visible From → DMARC alignment, p=none/quarantine/reject, rua reports first.
  5. Forwarding breaks it → ARC; a reward for enforcing → BIMI (+ VMC).
  6. Encryption stripped on the path → MTA-STS + TLS-RPT; end to end → S/MIME.
  7. Bad attachments and links → secure email gateway, sandboxing, link rewriting.
  8. A real mailbox with a fake request → out-of-band call-back.

Common mistakes (and the fix)

Mistake What you see Why Fix
SPF only, no DMARC spoof, own envelope SPF pass for evil.example SPF never checks the visible From DMARC with alignment
p=reject on day one your own billing mail rejected unknown senders not yet authenticated p=none, read rua reports, then enforce
SPF with 14 includes permerror over the 10-lookup limit remove unused senders, use subdomains
two SPF records on one domain permerror a domain must publish only one SPF record merge into one record
DKIM key never rotated / 512-bit weak or leaked key no key management 2048-bit RSA or Ed25519, rotate via new selectors
MTA-STS straight to enforce mail to a mis-listed MX refused policy not tested start with mode: testing + TLS-RPT
bank change approved by email reply Rs 4,80,000 to a fraudster the mailbox itself was compromised call back a known number, two-person approval
trusting the BIMI logo "it had the logo, so it was safe" the logo proves the domain, not the request judge the request, not the sender badge

Mini project: an email authentication report

Write a program that takes a dictionary of DNS TXT records for a domain (SPF, _dmarc, <selector>._domainkey, _mta-sts, _smtp._tls, default._bimi) and prints a report card: SPF present and under 10 lookups, DMARC policy and whether rua is set, DKIM key present, MTA-STS mode, TLS-RPT present, BIMI eligible (DMARC enforced). Finish with the next recommended step.

Practice

1. Extend the SPF toy so include: pulls in another domain's IPs.

Solution
DNS = {"chai.example": "v=spf1 ip4:203.0.113.10 include:mailer.example -all",
       "mailer.example": "v=spf1 ip4:192.0.2.25 -all"}

def allowed_ips(domain, depth=0):
    if depth > 10: raise RuntimeError("permerror: too many lookups")
    ips = []
    for part in DNS.get(domain, "").split():
        if part.startswith("ip4:"): ips.append(part[4:])
        if part.startswith("include:"): ips += allowed_ips(part[8:], depth + 1)
    return ips

print(allowed_ips("chai.example"))   # ['203.0.113.10', '192.0.2.25']

2. Make the report toy print the policy you'd choose next.

Solution
unknown_legit = any(ip == "192.0.2.25" for ip, _, r in rows if r == "fail")
print("next policy:", "stay at p=none and fix senders" if unknown_legit else "p=quarantine")

3. A mail passes DKIM with d=mailer.example and SPF for bounce.mailer.example. Its From is news@chai.example. Does it pass DMARC?

Solution

No. Neither passing domain aligns with chai.example. The fix is to have the newsletter service sign with d=chai.example (or use a custom return-path under chai.example).

4. Why does a mailing list break DMARC, and what fixes it?

Solution

It re-sends from its own IP (SPF fails for the original domain) and adds a footer or subject tag (DKIM body hash fails). ARC lets the list seal the original results; receivers that trust the list can honour them.

5. Write the call-back rule for your team in one sentence.

Solution

"Any request to change bank details or make an urgent payment is confirmed by phone on the number already in our records, never one given in the email, and approved by a second person."

Quick quiz

A: SPF with -all
B: DMARC alignment with p=reject
C: MTA-STS in enforce mode
D: BIMI

A spoofer's mail passes SPF for evil.example but shows From: ceo@chai.example. What rejects it?

Answer

B. DMARC requires SPF or DKIM to pass for a domain aligned with the visible From. SPF passed only for evil.example, so with p=reject the mail is refused. MTA-STS protects the connection; BIMI shows a logo.

Interview questions

  1. Why is email spoofing possible? SMTP doesn't authenticate the envelope or header sender; the client simply states them.
  2. Envelope sender vs header From? Envelope (MAIL FROM, return-path) is for bounces and is what SPF checks; header From is what users see and what DMARC protects.
  3. What does SPF check, and what are its limits? Whether the sending IP is authorised for the envelope domain; it ignores the visible From, has a 10-lookup limit, and breaks on forwarding.
  4. How does DKIM verification work? The receiver reads d= and s=, fetches the public key at s._domainkey.d, recomputes the body hash and header hash, and checks the signature.
  5. What is DMARC alignment? The SPF or DKIM authenticated domain must match the header From domain (relaxed: same organisational domain; strict: exact).
  6. How do you roll out DMARC safely? p=none with rua, identify and authenticate all legitimate senders, then quarantine, then reject.
  7. What changed with DMARCbis? Published May 2026 as RFC 9989-9991 replacing RFC 7489; DNS tree walk instead of the Public Suffix List, pct historic, new t and np tags.
  8. What problem does ARC solve? Authentication results lost when intermediaries forward and modify mail.
  9. What attack does MTA-STS stop? STARTTLS stripping and delivery to unauthorised MX hosts; TLS-RPT reports failures.
  10. TLS vs S/MIME? TLS protects each server-to-server hop; S/MIME signs and encrypts the message end to end.
  11. Why can't DMARC stop BEC? BEC often comes from a real compromised mailbox or a look-alike domain that authenticates correctly; process controls like call-backs are needed.

Glossary

Term Meaning
email spoofing sending mail that claims an address you don't own
email authentication checks that confirm which domain really sent a message
SMTP Simple Mail Transfer Protocol, how mail servers hand over messages
MTA mail transfer agent: a server that sends and receives mail
envelope sender the MAIL FROM / return-path address, used for bounces, hidden from readers
header From the From address shown to the reader
DNS TXT record a free-text DNS record used to publish SPF, DKIM, DMARC and other policies
SPF Sender Policy Framework: the list of servers allowed to send for a domain
-all / ~all SPF: everything else fails / soft-fails
permerror a permanent SPF error, e.g. more than 10 lookups
DKIM DomainKeys Identified Mail: a domain's signature over headers and body
selector the DKIM label choosing which public key to use
_domainkey the DNS name part where DKIM public keys live
body hash (bh=) the hash of the message body inside a DKIM signature
DMARC Domain-based Message Authentication, Reporting and Conformance
alignment the authenticated domain matching the header From domain
p=none / quarantine / reject DMARC policies: monitor / spam folder / refuse
aggregate report (rua) daily XML summaries of mail claiming your domain
failure report (ruf) per-message failure reports, rarely sent
DMARCbis the 2026 DMARC standard: RFC 9989, 9990, 9991
ARC Authenticated Received Chain: signed authentication results added by each forwarder
BIMI Brand Indicators for Message Identification: a logo for authenticated mail
VMC Verified Mark Certificate proving a logo is a registered mark
STARTTLS the SMTP command that upgrades a connection to TLS
STARTTLS stripping deleting the STARTTLS offer so mail goes unencrypted
MTA-STS a policy requiring authenticated TLS for delivery to a domain
TLS-RPT daily reports of TLS delivery successes and failures
MX record the DNS record naming a domain's incoming mail servers
S/MIME signing and encrypting email end to end with personal certificates
end-to-end encryption only sender and intended reader can read the content
secure email gateway a filter that inspects every message before the inbox
attachment sandboxing opening attachments in an isolated machine and watching behaviour
macro a small program inside an Office document
link rewriting routing links through a checker so they're re-checked at click time
BEC business email compromise: payment fraud through real or look-alike mailboxes
out-of-band verification confirming a request through a separate, already-trusted channel
look-alike domain a domain made to resemble a real one, e.g. cha1.example

Summary

  • SMTP trusts whatever the sender types: spoofing is easy by default.
  • SPF lists your sending servers (envelope only, 10 lookups max).
  • DKIM signs your messages (d=, s=, key at _domainkey).
  • DMARC ties SPF/DKIM to the visible From with alignment and a policy; read rua reports, then move none → quarantine → reject. DMARCbis (RFC 9989-9991, May 2026) is the current standard.
  • ARC rescues forwarded mail; BIMI shows your logo once DMARC is enforced.
  • MTA-STS and TLS-RPT stop STARTTLS stripping; S/MIME protects end to end.
  • Gateways, sandboxing and link rewriting handle dangerous content.
  • BEC passes authentication: call back on a known number.
  • Next episode: security logging fundamentals.

Sources (fetched 14 Nov 2026)

  • Mailhardener, SPF lookup limit explained: https://www.mailhardener.com/blog/spf-lookup-limit-explained
  • AutoSPF, Inside RFC 6376: how DKIM verification works: https://autospf.com/blog/inside-rfc-6376-how-dkim-verification-actually-works/
  • PowerDMARC, DMARC RFC standard: https://powerdmarc.com/dmarc-rfc-standard/
  • Suped, DMARCbis is now published as RFC 9989, 9990, 9991: https://www.suped.com/blog/dmarcbis-is-now-published-as-rfc-9989-9990-9991
  • IETF blog, ARC (RFC 8617): https://www.ietf.org/blog/arc/
  • IETF, BIMI guidance draft: https://datatracker.ietf.org/doc/html/draft-brotman-ietf-bimi-guidance
  • AutoSPF, MTA-STS: https://autospf.com/email-authentication/mta-sts/