Exchange Online Email Security: DMARC Enforcement, Defender for Office 365 and Inbox Rule Hunting

November 18, 2026 · 2 min read · IT Guiders Team

Exchange Online Email Security: DMARC Enforcement, Defender for Office 365 and Inbox Rule Hunting

Harden Exchange Online: DKIM and DMARC rollout, anti-phishing and Safe Links policies, mail flow rules, blocking auto-forwarding and KQL hunting for malicious inbox rules.

Email remains the main entry point for business email compromise (BEC) and credential phishing. In Exchange Online, a layered setup of authentication, filtering, transport rules and detection closes the common paths.

1. Authenticate your domain

  • SPF: v=spf1 include:spf.protection.outlook.com -all (add other senders; stay under 10 lookups).
  • DKIM: enable for every accepted domain and rotate keys:
New-DkimSigningConfig -DomainName contoso.com -Enabled $true
Get-DkimSigningConfig -Identity contoso.com | fl Enabled,Selector1CNAME,Selector2CNAME

Publish the two selector CNAMEs shown.

  • DMARC: move through p=none (collect reports), p=quarantine; pct=25, then p=reject. Use a DMARC reporting service to find third-party senders (CRM, marketing, ticketing) that fail alignment.
  • MTA-STS and TLS-RPT for inbound TLS enforcement.

2. Defender for Office 365 policies

Start with the Standard or Strict preset security policies, then tune only where needed.

  • Anti-phishing: impersonation protection for executives and key domains, mailbox intelligence, spoof intelligence.
  • Safe Links: time-of-click URL protection in email, Teams and Office apps.
  • Safe Attachments: dynamic delivery with detonation.
  • Anti-spam and anti-malware: block common attachment types (exe, js, iso, img, macros from the internet).
  • Enable Zero-hour auto purge (ZAP) and quarantine policies that let users report but not release high-confidence phishing.

3. Transport rules and tenant settings

  • Block automatic external forwarding through the outbound spam policy (AutoForwardingMode Off).
  • Tag external email with a banner or prefix, and warn when the display name matches an internal user.
  • Disable basic authentication for protocols that do not need it and block SMTP AUTH except for named service accounts:
Set-TransportConfig -SmtpClientAuthenticationDisabled $true
  • Restrict shared mailbox sign-in and review mailbox permissions (Full Access, Send As) quarterly.

4. Detect malicious inbox rules and forwarding

Attackers create rules that hide replies or forward mail. Hunt in Defender XDR advanced hunting or Sentinel:

CloudAppEvents
| where Timestamp > ago(7d)
| where ActionType in ("New-InboxRule","Set-InboxRule","UpdateInboxRules")
| extend p = tostring(RawEventData.Parameters)
| where p has_any ("ForwardTo","RedirectTo","ForwardAsAttachmentTo","DeleteMessage","MarkAsRead")
| project Timestamp, AccountDisplayName, IPAddress, p

Alert on rules that move mail to RSS Feeds or Archive, set DeleteMessage, or match keywords such as invoice, payment and bank.

5. Respond to a compromised mailbox

  1. Reset the password and revoke sessions (Revoke-MgUserSignInSession).
  2. Remove malicious inbox rules, forwarding, delegates and OAuth app consents.
  3. Review the sign-in and audit logs for the previous 30 days and check what was sent from the mailbox.
  4. Search and purge phishing messages tenant-wide with Content Search or Threat Explorer.
  5. Notify affected parties and decide whether the incident meets notification thresholds.

Operate it

Review the Defender for Office 365 threat protection status report weekly, check quarantine for false positives, run an attack simulation training campaign each quarter and track the phishing click rate and report rate.

Common mistakes

DMARC stuck at p=none for years; forwarding allowed for convenience; admin mailboxes that skip filtering; no process for users to report suspicious mail.

IT Guiders hardens Exchange Online and operates the monitoring around it.

exchange online email securitymicrosoft-solutions

This article is general information, not legal, audit or compliance advice.

Related articles

Ready To Transform Your Technology Strategy?

Talk to an expert about your goals. No obligation, direct access to specialists.