Security for Legal SaaS

Episode 16 · Module 5 · Authentication & Identity

Email Security for SaaS

18 May 2026 · 8:57 · Security for Legal SaaS

8:57 8:57

Email remains the primary attack vector for breaching organisations. Alice and Dan cover the SPF/DKIM/DMARC authentication triad, magic-link security risks and hardening, email-based account recovery attacks, BIMI brand indicators, MTA-STS transport security, and the architecture principle that email should notify but never transport sensitive data — especially privileged legal content.

Today’s Lesson

Security for Legal SaaS — Episode 16: Email Security for SaaS

The Weakest Link in Your Security Chain

Email remains the primary attack vector for breaching organisations. The FBI’s IC3 reported $2.9 billion in losses from business email compromise (BEC) in 2023 alone. For legal SaaS platforms that send privileged case updates, court deadline reminders, and magic-link authentication tokens via email, a compromised email channel is a direct path to privilege waiver.

Key stat: 74% of all breaches involve a human element — phishing, pretexting, or credential theft via email. Email is where social engineering meets technical exploitation.

The triad of SPF, DKIM, and DMARC forms the baseline defence for outbound email integrity. Without all three configured correctly, your platform’s emails can be spoofed, your magic links intercepted, and your clients phished using your own domain.

SPF, DKIM, and DMARC — The Authentication Triad

SPF (Sender Policy Framework)

SPF (RFC 7208) publishes a DNS TXT record — DNS being the internet’s address book that translates domain names into IP addresses — listing which IP addresses are authorised to send email on behalf of your domain. Receiving mail servers check the envelope sender against this list.

SPF Component Purpose
v=spf1Version identifier
include:_spf.google.comAuthorise Google Workspace IPs
include:sendgrid.netAuthorise transactional email provider
-allHard-fail everything else (reject, don’t softfail)

Critical for legal SaaS: Use -all (hard fail), not ~all (soft fail). Soft fail means spoofed emails from your domain still get delivered — just marked suspicious. Google’s email sender guidelines (2024) require SPF alignment for bulk senders.

DKIM (DomainKeys Identified Mail)

DKIM (RFC 6376) cryptographically signs email headers and body. The sending server attaches a signature using a private key; receivers verify against the public key in your DNS. This proves the email was not modified in transit and genuinely originated from your infrastructure.

For legal SaaS platforms sending transactional email through services like SendGrid, Postmark, or AWS SES, you must configure DKIM signing with your own domain key — not the provider’s default. Postmark’s DKIM guide details the DNS CNAME setup.

DMARC (Domain-based Message Authentication, Reporting, and Conformance)

DMARC (RFC 7489) ties SPF and DKIM together with a policy declaration and reporting mechanism.

DMARC Tag Recommended Value Meaning
p=rejectProduction policyReject emails failing both SPF and DKIM
rua=mailto:dmarc@yourdomain.comAggregate reportsReceive daily XML reports of authentication results
ruf=mailto:forensics@yourdomain.comForensic reportsReceive per-failure reports (careful — may contain PII)
pct=100Full enforcementApply policy to 100% of messages
aspf=sStrict SPF alignmentDomain must exactly match (no subdomain)

Deployment warning: Go from p=nonep=quarantinep=reject over 4–6 weeks while monitoring aggregate reports. Jumping straight to p=reject without monitoring will block legitimate email you forgot about — marketing tools, CRM integrations, legacy systems. DMARC.org recommends this graduated approach.

Magic-Link Authentication Risks

Magic links — one-time URLs sent via email for passwordless login — are increasingly popular in legal SaaS. But they inherit every vulnerability of the email channel.

Attack Scenarios

Attack Mechanism Impact
Email account compromiseAttacker with access to inbox clicks magic linkFull account takeover
Link interception (MitM)Corporate email proxies, logging gatewaysToken captured before user clicks
Link forwardingUser accidentally forwards email containing active linkUnintended third-party access
Prefetch/previewEmail security scanners follow links automaticallyToken consumed before user can use it

Auth0’s security guidance on magic links recommends: single-use tokens, short expiry (10 minutes maximum), binding to the originating session, and requiring the user to complete login on the same device/browser that initiated the request.

Hardening Magic Links

  1. Bind to session — The link only works in the browser session that requested it
  2. Device fingerprint — Require the same IP range or device characteristics
  3. Short TTL — 5–10 minutes maximum. OWASP recommends tokens expire within minutes, not hours
  4. Rate limit — Maximum 3 magic link requests per email per hour
  5. Notify on use — Send a separate notification when the link is consumed from a new device

Email-Based Account Recovery Attacks

Account recovery via email is the reset button that bypasses every other security control. If an attacker controls the email address associated with an account, they control the account.

Microsoft’s research on account takeover showed that Lapsus$ specifically targeted help desk staff to trigger email-based password resets. For legal SaaS:

BIMI — Brand Indicators for Message Identification

BIMI (Brand Indicators for Message Identification) displays your verified logo next to emails in supporting clients (Gmail, Apple Mail, Yahoo). It requires p=quarantine or p=reject DMARC policy and a Verified Mark Certificate (VMC) from DigiCert or Entrust.

For legal SaaS, BIMI serves a security purpose beyond branding: it trains recipients to expect your logo. Phishing emails spoofing your domain will not display the logo, providing a visual signal that something is wrong. Google’s BIMI requirements mandate DMARC enforcement as a prerequisite.

Secure Transactional Email Architecture

Layer Control Purpose
Sending infrastructureDedicated IP poolReputation isolation from marketing email
AuthenticationSPF + DKIM + DMARC (p=reject)Prevent spoofing
TransportTLS enforcement (MTA-STS)Prevent downgrade attacks
ContentNo sensitive data in email bodyEmail is not a secure channel
LinksTokenised, session-bound, short-livedPrevent interception/replay
MonitoringDMARC aggregate reports + alertingDetect spoofing attempts
FallbackMTA-STS + DANEPrevent TLS stripping

MTA-STS (RFC 8461) publishes a policy requiring TLS for email delivery to your domain — preventing downgrade attacks where an attacker strips encryption from the SMTP (Simple Mail Transfer Protocol) connection.

Architecture principle: Email is a notification channel, never a data transport channel. Case updates should say “You have a new update — log in to view it” rather than including the actual privileged content. OWASP’s transaction authorisation guidance reinforces this: sensitive actions require authenticated confirmation, not email-borne tokens alone.

Legal SaaS-Specific Considerations

  1. Court notification emails — If your platform sends court deadline reminders, a spoofed “deadline extended” email could cause a lawyer to miss a filing deadline. DMARC p=reject prevents this.
  2. Client communication summaries — Never include privileged content in email notifications. A forwarded email or compromised inbox exposes privilege.
  3. Multi-tenant sender isolation — Each law firm tenant should ideally send from their own subdomain (firmname.yourplatform.com) with dedicated SPF/DKIM, isolating reputation and preventing cross-tenant spoofing.
  4. Regulatory email retentionSingapore’s PDPA requires organisations to protect personal data in electronic communications. Transactional emails containing client identifiers must be treated as personal data.

Conclusion

Email security for SaaS is not optional — it is foundational. The SPF/DKIM/DMARC triad prevents domain spoofing. Magic links must be session-bound and short-lived. Account recovery must not rely solely on email. And the architecture principle is simple: email notifies, it never transports sensitive data.

Configure DMARC at p=reject. Deploy BIMI. Enforce MTA-STS. Treat every email your platform sends as a potential attack vector if spoofed — because your adversaries already do.

Next episode: Password Hashing Done Right — why storing passwords “encrypted” is almost as bad as storing them in plaintext.

Sources & references

  1. FBI Internet Crime Complaint Center (IC3), 2023 Internet Crime Report. $2.9 billion in BEC losses
  2. Verizon, 2024 Data Breach Investigations Report. 74% of breaches involve a human element
  3. IETF, RFC 7208: Sender Policy Framework (SPF)
  4. Google, “Email Sender Guidelines,” 2024. SPF/DKIM/DMARC requirements for bulk senders
  5. IETF, RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
  6. Postmark, “DKIM: DomainKeys Identified Mail.” Implementation guide
  7. IETF, RFC 7489: Domain-based Message Authentication, Reporting, and Conformance (DMARC)
  8. DMARC.org, “DMARC Overview.” Graduated deployment recommendation
  9. Auth0, “Email Magic Link Authentication.” Security guidance for passwordless
  10. OWASP, “Forgot Password Cheat Sheet.” Token expiry recommendations
  11. Microsoft Security Blog, “DEV-0537 (Lapsus$) criminal actor,” March 2023. Account takeover via help desk manipulation
  12. BIMI Group, “Implementation Guide.” Brand indicator display requirements
  13. Google, “BIMI in Gmail.” Requirements and setup
  14. IETF, RFC 8461: SMTP MTA Strict Transport Security (MTA-STS)
  15. OWASP, “Transaction Authorization Cheat Sheet”
  16. Singapore Personal Data Protection Commission, “Personal Data Protection Act 2012”