Email Filtering Best Practices: Defender and Gmail Setup
To set up email filtering against phishing, start from each vendor’s recommended baseline, switch it on for everyone, add impersonation protection for the people attackers imitate, and give quarantine and user reports an owner who reviews them. In Microsoft 365 that baseline is the Standard or Strict preset security policy; in Google Workspace it is the Gmail Safety settings for attachments, links and spoofing. The vendors’ documentation, as of December 2026, shows why switching them on matters: Microsoft’s Standard and Strict presets apply to no one until you assign users, and its default anti-phishing policy leaves impersonation protection for named users and domains unconfigured; Google’s attachment and spoofing protections default to keeping a flagged message in the inbox with a warning. Having Defender for Office 365 or Gmail doesn’t by itself mean these settings are configured.
The volume filters face is large. The FBI’s 2025 IC3 Annual Report recorded 191,561 phishing/spoofing complaints in calendar 2025, the most of any crime type, and APWG counted 1,069,681 phishing attacks in the second quarter of 2026 (APWG counts unique phishing sites, which it treats as attacks). Three neighboring topics have their own guides: publishing SPF, DKIM and DMARC records, whose results filters consume (DMARC, SPF and DKIM); reading a message’s headers (email header analysis); and monitoring lookalike domains (brand impersonation defense).
What to configure, at a glance
The table maps each control to the setting name each vendor’s documentation uses. Names are quoted as the pages give them (Microsoft Learn pages last updated July to October 2026; Google Workspace Help pages last updated 10 November 2026).
| Control | Microsoft 365 (Defender for Office 365) | Google Workspace (Gmail) |
|---|---|---|
| Recommended baseline | Standard or Strict preset security policy; Built-in protection | ”Apply future recommended settings automatically” in each Safety section |
| Link protection | Safe Links: on, URLs rewritten, real-time scanning, wait for scan to finish | Links and external images: “Identify links behind shortened URLs”, “Scan linked images”, “Show warning prompt for any click on links to untrusted domains” |
| Attachment protection | Safe Attachments: unknown malware response Block or Dynamic Delivery | Attachments: encrypted attachments and attachments with scripts from untrusted senders; anomalous attachment types |
| Impersonation | Anti-phishing policy: user, domain and mailbox-intelligence impersonation protection | Spoofing and authentication: similar domain names, employee names, your own domain |
| Spoofing and authentication | Spoof intelligence; “Honor DMARC record policy when the message is detected as spoof" | "Protect against any unauthenticated emails” (SPF or DKIM) |
| External-sender cue | External icon (Set-ExternalInOutlook); first contact safety tip | ”Warn for external recipients” (End User Access), on by default |
| Quarantine | Quarantine policies and retention by detection type | Email quarantine (Moderation Tool): Allow or Deny, 30-day retention |
| User reporting | Built-in Report button, user reported settings | ”User-reported phishing” system-defined alert rule, Active by default |
Microsoft Defender for Office 365
Start with the preset security policies
Microsoft’s preset security policies page (last updated 3 July 2026) describes three presets: Standard, Strict and Built-in protection. It says virtually all settings in the presets are not configurable, being “based on our observations in the datacenters”, and that they balance keeping harmful content away from users against needless disruption. Until you turn the Standard and Strict profiles on and assign users, they apply to no one. Built-in protection, in contrast, is assigned to all recipients by default in organizations with any number of Defender for Office 365 licenses. It gives Safe Links and Safe Attachments protection to everyone who isn’t in the Standard or Strict presets or in a custom Safe Links or Safe Attachments policy.
Precedence matters when you mix presets and custom policies. The page lists the order as Strict preset, Standard preset, Defender for Office 365 evaluation policies, custom policies by priority, then Built-in protection and default policies. A recipient in both a preset and a custom anti-spam policy gets the preset’s settings.
The page summarizes the meaningful differences between the two main presets in a table. The setting names and values below are Microsoft’s:
| Setting (policy) | Standard | Strict |
|---|---|---|
| Bulk compliant level (BCL) met or exceeded detection action (anti-spam) | Move message to Junk Email folder | Quarantine message |
| Bulk email threshold (anti-spam) | 6 | 5 |
| Spam detection action (anti-spam) | Move message to Junk Email folder | Quarantine message |
| If the message is detected as spoof by spoof intelligence (anti-phishing) | Move message to Junk Email folder | Quarantine message |
| Show first contact safety tip (anti-phishing) | Selected | Selected |
| If mailbox intelligence detects an impersonated user (anti-phishing) | Move message to Junk Email folder | Quarantine message |
| Phishing email threshold (anti-phishing) | 3 - More aggressive | 4 - Most aggressive |
| Anti-malware, Safe Attachments and Safe Links policies | No difference | No difference |
The first contact safety tip is in Microsoft’s table although both presets select it; Microsoft’s recommended settings tables (last updated 10 August 2026) show it off in the default anti-phishing policy. The preset page adds that the Strict profile “tends to quarantine less harmful email (for example, bulk and spam) than the Standard protection profile”, while many settings are the same in both, “in particular, for unquestionably harmful email like malware or phishing”. Microsoft describes Standard as “A baseline profile that’s suitable for most users” and Strict as “A more aggressive profile for selected users (high value targets or priority users)”.
The preset page also lists the Safe Links differences for Built-in protection against Standard and Strict: Built-in protection lets users click through to the original URL and does not rewrite URLs (checks run through the Safe Links API), and it does not apply Safe Links to mail sent inside the organization. Standard and Strict do the opposite on all three.
Safe Links
Safe Links (page last updated 14 October 2026) provides URL scanning and rewriting of inbound email during mail flow, plus time-of-click verification of links in email, Teams and supported Office apps. Microsoft lists these email settings, each with a recommended value of on:
- Safe Links scanning in email, which rewrites URLs by default and checks them against known malicious URLs when clicked, with URLs lacking a valid reputation detonated in the background.
- “Apply Safe Links to email messages sent within the organization”.
- “Apply real-time URL scanning for suspicious links and links that point to files”.
- “Wait for URL scanning to complete before delivering the message”, which holds messages with URLs until scanning finishes.
The page recommends leaving “Let users click through to the original URL” off, and it documents limits worth knowing: Safe Links supports only HTTP, HTTPS and FTP links; it gives no protection for URLs in rich text format (RTF, also known as TNEF) messages; it ignores S/MIME signed messages; it doesn’t work on mail-enabled public folders; and using another service to wrap links before Defender for Office 365 “might prevent Safe Links from processing links”. One of its scenarios describes a user whose IT department configured Safe Links “to not rewrite URLs, and to check via API only”. He clicked a link in an email client that doesn’t support the Safe Links API; the link “was legitimate on delivery, but was later weaponized”, and he was phished. That is the argument for keeping rewriting on unless every client in use supports the API, which Microsoft says supported versions of Outlook for Windows, Mac, iOS, Android and the web do.
Safe Attachments
Safe Attachments (page last updated 10 August 2026) opens attachments in a virtual environment (“detonation”) before delivery, after anti-malware scanning. Microsoft says scanning typically completes within 15 minutes. The “unknown malware response” options are:
| Option | What happens |
|---|---|
| Off | No Safe Attachments scanning; anti-malware still applies. Not recommended for most users. |
| Monitor | Delivers, then tracks detected threats |
| Block | Quarantines messages with detected attachments; the page calls it the default and the recommended value in Standard and Strict |
| Dynamic Delivery | Delivers the message at once with placeholders for attachments until scanning completes; Exchange Online mailboxes only |
Microsoft’s recommended settings tables list Block for Built-in protection, Standard and Strict, but Off for new custom Safe Attachments policies, so check the value whenever you create one.
Password-protected attachments need a decision of their own. Microsoft says Safe Attachments “can’t fully scan or detonate a password-protected attachment unless the password is available”, for example in the email body. When Block is the unknown malware response, the setting “Block messages containing encrypted attachments that could not be scanned” quarantines such messages. Admins can release them without the password; users can supply the password for a just-in-time rescan, one attempt per message, if the quarantine policy lets them release their own messages. Microsoft’s recommended settings tables show this setting (Block unscanned attachments) not selected in new custom policies or in the Built-in protection, Standard and Strict presets.
Anti-phishing: spoofing and impersonation
The anti-phishing policies page (last updated 20 August 2026) separates two things that are easy to conflate. Spoofing forges the sender’s address or domain. Impersonation mimics a trusted user, domain or brand, often with a lookalike. Microsoft states that impersonation “can pass email authentication checks (SPF, DKIM, and DMARC) if the attacker created a lookalike domain and published valid DNS records”. Authentication alone therefore does not settle the question, which is why impersonation settings exist.
Basic anti-phishing features (spoof intelligence, first contact safety tip, unauthenticated sender indicators) apply to all cloud mailboxes. The impersonation settings and phishing email thresholds apply only in Defender for Office 365 policies, per the documentation’s own comparison table. The key settings:
- Honor DMARC record policy when the message is detected as spoof. Selected by default, per the recommended settings tables. You then choose separate actions for senders whose DMARC policy is p=quarantine (quarantine the message, or move it to the recipients’ Junk Email folders) and p=reject (quarantine or reject the message). For p=none, Microsoft 365 “takes no action based on DMARC”, though other filters can still act on the message. If the MX record points to a non-Microsoft service or device in front of Microsoft 365, the setting applies only if Enhanced Filtering for Connectors is enabled on the connector that receives inbound mail.
- User impersonation protection. Up to 350 protected users in each anti-phishing policy. By default no sender addresses are protected, in the default policy or in custom ones, and the default action is “Don’t apply any action”. Microsoft recommends protecting senders in key roles, such as the CEO, CFO and other senior leaders.
- Domain impersonation protection. Up to 50 custom domains per policy; the preset policies automatically cover all your accepted domains. Again, no domains are configured by default in the default or custom policies.
- Mailbox intelligence. Uses the contact history it learns. With both “Enable mailbox intelligence” and “Enable intelligence for impersonation protection” turned on, user and domain impersonation protection doesn’t work if the sender and recipient previously communicated by email. Microsoft’s example is a vendor who shares the CEO’s name: for recipients who regularly correspond with that vendor, the vendor’s messages aren’t flagged as impersonating the CEO. The first setting is on by default and the second is off, and both must be on for mailbox intelligence to act on what it detects.
- Phishing email threshold. From “1 - Standard” (the default) to “4 - Most aggressive”; Microsoft says the chance of false positives increases as you raise it.
- Trusted senders and domains. Exceptions to impersonation protection, up to 1,024 entries. Trusted domains don’t include subdomains.
On licensing, Microsoft’s Defender for Office 365 overview (last updated 21 May 2026) lists user and domain impersonation protection, mailbox intelligence impersonation protection, phishing email thresholds, Safe Attachments and Safe Links among the features Defender for Office 365 Plan 1 adds to the built-in protection of every cloud mailbox. Plan 2 adds attack simulation training, Threat Explorer and automated investigation and response, among other tools. Quarantine, quarantine policies and user reported messages are built-in features. Microsoft’s service description says Plan 1 is included in Microsoft 365 Business Premium and, from 1 July 2026, in Office 365 E3 and Microsoft 365 E3, and Plan 2 in subscriptions such as Microsoft 365 E5, A5 and GCC G5. The overview adds that Defender for Office 365 is also available as an add-on to many Microsoft 365 subscriptions with cloud mailboxes.
Marking external senders
Microsoft’s Set-ExternalInOutlook cmdlet turns on external sender identification in Outlook, Outlook for Mac, Outlook on the web and Outlook for iOS and Android: an External icon in the area of the subject line of messages from external senders. The cmdlet reference says to disable any mail flow rules that already add text to the subject line of external mail before turning it on, to avoid duplication; that after it’s enabled, it can take 24 to 48 hours before users see the icon; and that an allow list of up to 200 entries exempts senders or domains. The first contact safety tip is a separate cue, shown the first time a recipient gets a message from a sender or when they don’t often get messages from that sender. Microsoft recommends turning it on; it is off in the default anti-phishing policy and selected in Standard and Strict. The anti-phishing page lists cases where the tip isn’t added, such as S/MIME signed messages and mailboxes created less than seven days ago.
An external tag cannot tell a real vendor from a lookalike vendor, because both are external. It helps most on messages that claim to be a colleague; vendor-side checks belong to payment-verification procedures, not filters.
Quarantine
Microsoft’s quarantine page (last updated 17 July 2026) says quarantine cannot be turned off entirely: “Malware and high-confidence phishing messages are always quarantined to protect the service.” Recipients can never release messages quarantined as malware, as malware or phishing by Safe Attachments, or as high-confidence phishing by anti-spam; if the policy allows, they can only request release. Users can work with their own spam, bulk, phishing, spoof and impersonation detections by default, and admins can create quarantine policies that loosen or tighten that and switch on notifications, per the quarantine policies page (last updated 31 August 2026).
Retention before permanent deletion, from the quarantine page:
| Quarantine reason | Default retention |
|---|---|
| Anti-spam: spam, high confidence spam, phishing, high confidence phishing, bulk | 15 days in the default anti-spam policy and in anti-spam policies you create (configurable from 1 to 30 days); 30 days in the Standard and Strict presets (not changeable) |
| Anti-phishing: spoof intelligence, user impersonation, domain impersonation, mailbox intelligence | 15 or 30 days: the “Retain spam in quarantine for this many days” value from the first matching anti-spam policy the recipient is in |
| Anti-malware | 30 days, not configurable |
| Safe Attachments (malware or phishing, and unscannable encrypted attachments) | 30 days, not configurable |
After expiry, messages are permanently deleted and cannot be recovered.
User reporting
Microsoft’s Outlook reporting page (last updated 3 July 2026) describes the built-in Report button, available when user reporting is on and the button is configured in user reported settings. Messages reported as phishing are deleted; messages reported as junk are moved to the Junk Email folder, and the sender is added to the user’s Blocked Senders list. The user reported settings page (last updated 28 September 2026) says admins choose whether reports go to a reporting mailbox, to Microsoft, or both. So that reports reach the reporting mailbox without being filtered, the page says to identify it as a SecOps mailbox in the advanced delivery policy and to exclude it from data loss prevention (DLP). If it isn’t configured as a SecOps mailbox and you run phishing simulations, a user-reported message might trigger a training assignment by the simulation product.
Google Workspace
Advanced phishing and malware protection
Google Workspace Help’s advanced phishing and malware protection page (last updated 10 November 2026) says that by default Gmail displays warnings and moves untrustworthy emails to the spam folder, and that the advanced settings help identify additional unwanted or harmful emails. In the Google Admin console the settings are under Menu > Apps > Google Workspace > Gmail > Safety, they require the Gmail Settings administrator privilege, and they can be tailored by organizational unit.
Each attachment and spoofing setting takes one of three actions: “Keep email in inbox and show warning” (the default), “Move email to spam” or “Quarantine”. The link settings are simply turned on or off. Users see a warning banner only with the first action, and warning banners appear only in Gmail on the web; third-party apps don’t display them. With Quarantine, messages go to admin quarantine and users see nothing.
| Section | Settings, as named by Google |
|---|---|
| Attachments | ”Protect against encrypted attachments from untrusted senders”; “Protect against attachment with scripts from untrusted senders”; “Protect against anomalous attachment types in emails” (with an allowlist for uncommon file types you approve) |
| Links and external images | ”Identify links behind shortened URLs”; “Scan linked images”; “Show warning prompt for any click on links to untrusted domains” (not available for IMAP/POP email clients). Google separately recommends turning on link protection for IMAP clients if users read mail in third-party IMAP apps. |
| Spoofing and authentication | ”Protect against domain spoofing based on similar domain names”; “Protect against spoofing of employee names”; “Protect against inbound emails spoofing your domain”; “Protect against any unauthenticated emails”; “Protect Groups from inbound emails spoofing your domain” |
Google says it scans all messages for malware whether or not the attachment settings are on; the settings add extra actions for certain file types and protect against senders with no prior Gmail history or with a low sender reputation. Each section also has “Apply future recommended settings automatically”, which turns on new recommended settings as Google adds them. For the link-click prompt, Google says that without it, warnings appear only for clicks to untrusted domains from suspicious emails.
Two cautions come from the same page. Listing a domain as a safe sender in spam settings doesn’t switch these protections off, but two spam setting options stop Gmail from ever displaying warning banners: “Bypass spam filters and hide warnings for messages from senders or domains in selected lists” and “Bypass spam filters and hide warnings for all messages from internal and external senders”. And allowlist settings don’t override the Quarantine option.
The unauthenticated-email setting is where authentication results enter Gmail filtering: a message must be authenticated, by any domain, with SPF or DKIM or both, and unauthenticated emails display a question mark next to the sender’s name. The sender-side requirements are covered in the DMARC article.
External recipient warnings
Google’s external recipient warnings page (last updated 10 November 2026) says the warnings are on by default: a warning banner, and an image or colored border next to external addresses. They show when a thread includes external recipients, when replying to a message from an external recipient and when composing a new message to one. They aren’t shown for addresses in the organization’s Directory, personal Contacts or other Contacts, nor for secondary domain or domain alias addresses. The control is “Warn for external recipients” under Menu > Apps > Google Workspace > Gmail > End User Access, and Google notes that “The setting to turn warnings on and off is available only for accounts that upgrade to Google Workspace.” The warnings aren’t available for personal Gmail accounts.
Quarantine
Google’s email quarantine setup page says quarantine is a feature of the Moderation Tool, set up by a super administrator, where incoming and outgoing messages wait for review. Quarantined messages are deleted permanently after 30 days if nobody acts, and neither admins nor users can recover them afterwards. A default quarantine exists; super admins can add custom quarantines, restricted quarantines that a reviewer group can access, and periodic notifications to super admins about newly quarantined messages. The manage quarantined messages page adds that Allow or Deny cannot be undone, and the setup page states that “Recipients are never notified when a message is quarantined”, so a quarantine setting needs an owner who checks the dashboard.
Reporting and clean-up
Google lists “User-reported phishing” among its system-defined alert rules (“Users at your domain received messages that they’ve classified as phishing”), in the system-defined rules page, listed as Active by default; the rules are under Menu > Rules in the Admin console, where an admin can set each one to send alerts to the alert center and email notifications. For removing a message from many inboxes, the security investigation tool page describes searching Gmail log events (Menu > Security > Security center > Investigation tool) and deleting the matching messages, marking them as spam or phishing, or sending them to the inbox. Google states the supported editions as Frontline Plus, Enterprise Plus, and Education Standard and Education Plus, and that Gmail log events are limited to Frontline Plus, Enterprise Plus and Education Plus.
A rollout checklist that follows from the documentation
- Turn on the baseline for everyone. Assign Standard (or Strict for priority users) in Microsoft 365; in Gmail, enable each Safety section and tick “Apply future recommended settings automatically”.
- Add the people attackers imitate. In Defender for Office 365, add senior leaders such as the CEO and CFO to user impersonation protection (350 maximum per policy) and the partner domains you frequently deal with to domain impersonation protection (50 maximum); neither list is configured by default. In Gmail, enable “Protect against spoofing of employee names” and the similar-domain setting.
- Pick actions deliberately. Gmail’s default action is a warning in the inbox; moving to spam or quarantine is stricter. In Microsoft 365, Strict quarantines spoof and mailbox-intelligence detections that Standard sends to Junk.
- Keep link rewriting or click-time checks on, and decide the policy for password-protected attachments. Safe Attachments can’t fully scan them without the password, and Microsoft’s “Block unscanned attachments” setting, which quarantines them, is not selected by default.
- Mark external mail. Turn on the Outlook External icon and keep Gmail’s external recipient warning on (it is on by default); keep the exemption lists short.
- Assign a quarantine owner. Set a review cadence, since Gmail recipients are never told and Microsoft recipients cannot release the most dangerous categories.
- Turn on the built-in Report button and route reports to a mailbox the security team reads; connect it to your incident response plan.
- Re-check after vendor changes. Both vendors change settings and defaults; the pages cited here carry their own update dates.
Third-party gateways
If a gateway sits in front of Microsoft 365, mail arrives with the gateway’s source IP. Microsoft’s Enhanced Filtering for Connectors page (last updated 15 October 2026) says the feature preserves the original source IP and sender information, improves anti-spoofing and anti-phishing accuracy, and lets Microsoft 365 use explicit SPF, DKIM and DMARC results. It is intended for cases where the MX record does not point to Microsoft 365, not for services that scan mail after Microsoft 365. After enabling it, Microsoft says to disable any mail flow rules that request a spam filtering bypass (SCL -1) for messages through that connector; it names two cases that might require keeping such a rule: Defender for Office 365 evaluation mode, and phasing in a defense-in-depth configuration.
One more point applies to any gateway that checks SPF first. RFC 9989, the current DMARC specification (May 2026), notes in section 7.1 that some receivers run SPF before any DMARC operations, so a sender’s “-all” record “could cause a message to be rejected early in the SMTP transaction, before any DMARC processing takes place”, even if an aligned DKIM signature might otherwise have let it pass DMARC.
Sources
- FBI IC3, 2025 IC3 Annual Report
- APWG Phishing Activity Trends Report, Q2 2026
- RFC 9989: DMARC
- Microsoft Learn: Preset security policies in cloud organizations
- Microsoft Learn: Recommended email and collaboration threat policy settings for cloud organizations
- Microsoft Learn: Safe Links in Microsoft Defender for Office 365
- Microsoft Learn: Safe Attachments in Microsoft Defender for Office 365
- Microsoft Learn: Anti-phishing policies in cloud organizations
- Microsoft Learn: Microsoft Defender for Office 365 overview
- Microsoft Learn: Microsoft Defender for Office 365 service description
- Microsoft Learn: Set-ExternalInOutlook
- Microsoft Learn: Quarantined email messages in cloud organizations
- Microsoft Learn: Configure quarantine policies in cloud organizations
- Microsoft Learn: Report phishing and suspicious emails in Outlook for admins
- Microsoft Learn: User reported settings
- Microsoft Learn: Enhanced Filtering for Connectors in Exchange Online
- Google Workspace Help: Advanced phishing and malware protection
- Google Workspace Help: Control Gmail external recipient warnings
- Google Workspace Help: Set up email quarantine
- Google Workspace Help: Manage quarantined messages
- Google Workspace Help: View and edit system-defined rules
- Google Workspace Help: Investigate reports of malicious emails
General information for administrators; test changes on a pilot group before organization-wide deployment, and confirm license entitlements in the vendors’ current documentation.