Configuring Exchange Online Mailbox Logging – Best Practices and Step-by-Step Guide

Important: Mailbox Auditing is Already ON by Default

Good news! Since 2019, Microsoft automatically enables mailbox auditing for all Exchange Online organizations. This means logging is already active for your mailboxes without requiring any manual configuration.

Should You Enable All Available Logging?

No, you should NOT enable all available logging. Here’s why:

  • Microsoft’s Recommendation: Use the default audit configuration, which Microsoft automatically manages and updates
  • Storage Impact: Audit logs consume storage space in each mailbox’s Recoverable Items folder (counts against the 30GB default limit)
  • Performance Consideration: Excessive logging can impact mailbox performance
  • Automatic Updates: Microsoft automatically adds new important actions to the default audit configuration as they’re released

What’s Logged by Default

The default configuration logs these critical actions:

ActionAdminDelegateOwner
Create (Calendar items)
HardDelete
MoveToDeletedItems
SendAs
SendOnBehalf
SoftDelete
Update
UpdateFolderPermissions
UpdateInboxRules

Step-by-Step Configuration Guide

Method 1: PowerShell (Recommended)

Step 1: Connect to Exchange Online PowerShell

Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

Step 2: Verify Organization-Wide Auditing is Enabled

Get-OrganizationConfig | Format-List AuditDisabled

Result should show False (meaning auditing is enabled)

Step 3: Check Current Mailbox Audit Status

# For a specific mailbox
Get-Mailbox -Identity "user@domain.com" | Format-List Name,AuditEnabled,DefaultAuditSet

# For all mailboxes
Get-Mailbox -ResultSize Unlimited | Format-Table Name,AuditEnabled,DefaultAuditSet

Step 4: Use Default Settings (Recommended)

# Restore default auditing for a mailbox that was customized
Set-Mailbox -Identity "user@domain.com" -DefaultAuditSet Admin,Delegate,Owner

Step 5: Only If Necessary – Customize Specific Actions

# Example: Add MailboxLogin tracking for owner actions
Set-Mailbox -Identity "user@domain.com" -AuditOwner @{Add="MailboxLogin"}

# Example: Set specific admin actions (overwrites defaults - not recommended)
Set-Mailbox -Identity "user@domain.com" -AuditAdmin MessageBind,FolderBind,HardDelete

Step 6: Configure Retention Period

# Default is 90 days, can extend up to 365 days (E5 license required for >180 days)
Set-Mailbox -Identity "user@domain.com" -AuditLogAgeLimit 180

# Apply to all mailboxes
Get-Mailbox -ResultSize Unlimited | Set-Mailbox -AuditLogAgeLimit 180

Step 7: Verify Configuration

# Check what actions are being audited
Get-Mailbox -Identity "user@domain.com" | Select-Object -ExpandProperty AuditAdmin
Get-Mailbox -Identity "user@domain.com" | Select-Object -ExpandProperty AuditDelegate
Get-Mailbox -Identity "user@domain.com" | Select-Object -ExpandProperty AuditOwner

Method 2: Microsoft 365 Admin Center (Limited Options)

Note: The GUI provides limited mailbox audit configuration options. Most settings require PowerShell.

To Search Audit Logs via GUI:

  1. Navigate to Microsoft Purview compliance portal
  2. Go to Audit in the left navigation
  3. Ensure audit log search is turned on (banner will appear if it’s not)
  4. Use the search interface to query audit logs
  5. Filter by:
    • Activities (e.g., “Mailbox activities”)
    • Date range
    • Users
    • File, folder, or site
  6. Export results as needed

To Export Mailbox Audit Logs via Classic EAC:

  1. Navigate to the Classic Exchange Admin Center
  2. Go to Compliance ManagementAuditing
  3. Click “Export mailbox audit logs”
  4. Specify date range and recipients
  5. Submit the export request

Best Practices Summary

  1. Keep default auditing enabled – It’s already on and Microsoft manages it
  2. Don’t enable all actions – Avoid FolderBind and MessageBind for owners (creates excessive logs)
  3. Retention considerations:
    • Standard licenses: 180 days retention
    • E5 licenses: 1 year retention by default
    • 10-year retention available with additional licensing
  4. Monitor storage: Check Recoverable Items folder size periodically
  5. Use PowerShell for configuration: GUI options are limited
  6. Test before mass deployment: If customizing, test on pilot mailboxes first

When to Customize Auditing

Only customize mailbox auditing if you have specific compliance requirements such as:

  • Regulatory requirements for specific action tracking
  • Security investigation needs
  • Tracking mailbox login events (MailboxLogin)
  • Monitoring specific delegate activities

Understanding FolderBind and MessageBind Logging for Mailbox Owners

What FolderBind and MessageBind Actually Log

FolderBind

What it logs: Every time a mailbox folder is accessed or opened

  • Records when someone navigates to or opens any folder (Inbox, Sent Items, Deleted Items, custom folders, etc.)
  • Captures the folder GUID and path
  • Logs the timestamp, client IP address, and application used
  • For delegates, entries are consolidated (one record per folder per 24-hour period to reduce volume)
  • Important: Not consolidated for owners – every folder access creates a separate log entry

MessageBind

What it logs: Every time a message is viewed in the preview pane or opened

  • Records when someone reads or opens an individual email message
  • Captures the message subject and ItemID
  • Logs whether the message was previewed or fully opened
  • Records the client application and IP address
  • Note: For E5 licensed users, this is replaced by the more sophisticated MailItemsAccessed action

Why These Actions Are NOT Enabled for Owners by Default

1. Massive Log Volume

The Reality: A typical user might:

  • Access 20-50 folders per day during normal email activity
  • View 50-200+ messages daily
  • Generate thousands of audit entries weekly
  • Create up to 100,000+ audit entries annually per mailbox

2. Storage Impact

  • Audit logs are stored in the mailbox’s Recoverable Items folder (Audits subfolder)
  • Count against the 30GB default quota (or 100GB with holds)
  • Maximum 3 million items can be stored in the Audits subfolder
  • Heavy users could hit these limits within months

3. Performance Considerations

  • Every folder navigation and message view triggers a write operation
  • Can impact mailbox performance, especially for heavy email users
  • Increases server-side processing load
  • May slow down email client responsiveness

4. Signal-to-Noise Ratio

  • 99.9% of owner FolderBind/MessageBind events are legitimate daily activity
  • Makes it extremely difficult to identify suspicious activity
  • Investigation tools often filter out FolderBind by default because of the noise

Legitimate Scenarios for Enabling FolderBind/MessageBind for Owners

1. Insider Threat Detection

Use Case: Monitoring high-risk individuals or sensitive roles

  • Executives with access to M&A information
  • Employees on performance improvement plans or termination notice
  • Users with access to intellectual property or trade secrets
  • Detecting unusual access patterns (e.g., accessing old emails before resignation)

2. Compliance Requirements

Use Case: Specific regulatory mandates

  • Financial services requiring complete audit trails (SEC, FINRA)
  • Healthcare organizations tracking PHI access (HIPAA)
  • Government contractors with security clearance requirements
  • Legal hold scenarios requiring complete activity documentation

3. Forensic Investigations

Use Case: Post-incident analysis

  • Determining if a compromised account’s emails were actually read
  • Investigating data exfiltration attempts
  • Proving or disproving unauthorized access claims
  • Building timeline of activities during security incidents

4. Privileged Account Monitoring

Use Case: Enhanced monitoring for administrative accounts

  • Service accounts that shouldn’t have regular email activity
  • Shared mailboxes with sensitive information
  • Discovery mailboxes used for legal searches
  • Executive assistant mailboxes with delegated access

Best Practices If You Enable FolderBind/MessageBind for Owners

1. Selective Implementation

# Enable only for specific high-risk mailboxes
Set-Mailbox -Identity "CEO@company.com" -AuditOwner @{Add="FolderBind","MessageBind"}

# Create a list of VIP users
$VIPUsers = "CEO@company.com","CFO@company.com","Legal@company.com"
foreach ($user in $VIPUsers) {
    Set-Mailbox -Identity $user -AuditOwner @{Add="FolderBind","MessageBind"}
}

2. Increase Retention Period

# Extend audit log retention to accommodate increased volume
Set-Mailbox -Identity "CEO@company.com" -AuditLogAgeLimit 365

3. Monitor Storage Impact

# Check audit folder size regularly
Get-MailboxFolderStatistics -Identity "CEO@company.com" -FolderScope RecoverableItems | 
    Where-Object {$_.Name -eq 'Audits'} | 
    Format-List FolderPath,FolderSize,ItemsInFolder

4. Implement Automated Analysis

  • Export logs to SIEM systems for pattern analysis
  • Set up alerts for unusual access patterns
  • Use machine learning to baseline normal behavior
  • Focus on deviations from typical patterns

5. Consider Alternative Solutions

  • For E5 Users: Use MailItemsAccessed instead (more intelligent, less noisy)
  • Microsoft Defender: Use insider risk management policies
  • Third-party tools: Consider specialized insider threat detection solutions
  • DLP policies: Focus on preventing data loss rather than tracking all access

The MailItemsAccessed Alternative (E5 Licenses)

For organizations with E5 licenses, MailItemsAccessed is a superior alternative that:

  • Intelligently aggregates similar activities (reduces noise by 80-90%)
  • Provides both sync and bind operation tracking
  • Includes deduplication (removes duplicate entries within 1-hour windows)
  • Records InternetMessageId for precise message tracking
  • Better suited for forensic investigations
  • Automatically enabled for E5 users

Summary Recommendation

Enable FolderBind/MessageBind for owners ONLY when:

  1. You have specific compliance or security requirements
  2. Monitoring high-risk individuals or during investigations
  3. You have the resources to analyze the massive data volume
  4. Storage and performance impacts have been evaluated
  5. You’ve implemented automated analysis tools

Otherwise: Stick with the default configuration and use alternative methods like DLP policies, insider risk management, and the MailItemsAccessed action (for E5 users) for more effective security monitoring.


Configuring robust anti-malware policies in Exchange Online Protection (EOP), with enhancements from Microsoft Defender for Office 365 (MDO)

Executive Summary

This guide will provide a comprehensive, production-safe approach using both the Microsoft 365 Defender portal and Exchange Online PowerShell. We will start with a baseline of security and then layer on advanced protections. The core strategy involves keeping the default EOP anti-malware policy as a foundational safety net while creating a higher-priority, custom policy for sensitive users, such as executives and finance teams. This ensures critical assets have the most aggressive, up-to-date protection without disrupting the entire organisation. We’ll also cover essential features like the Common Attachment Filter, Safe Attachments, Safe Links, and the Zero-hour Auto Purge (ZAP) engine to defend against a wide array of evolving threats, from zero-day malware to sophisticated phishing attacks.


1. Prerequisites & Licensing Checks

Before you begin, it’s crucial to understand your licensing model.

  • Exchange Online Protection (EOP): This is the baseline email security included with all Microsoft 365 subscriptions (e.g., Business Basic, Standard, E3). It provides fundamental anti-malware and anti-spam protection.
  • Microsoft Defender for Office 365 (MDO): This is an add-on or an included feature in higher-tier plans (e.g., Microsoft 365 Business Premium, E5). MDO Plan 1 adds Safe Attachments and Safe Links, while MDO Plan 2 adds advanced hunting, investigation, and automation features (e.g., Threat Explorer, Automated Investigation and Response). This guide assumes you may have an MDO licence and will detail the optional add-ons.

2. Policy Inventory & Strategic Approach

Best Practice: Do not modify the Default anti-malware policy. This ensures a consistent baseline of protection across all users who aren’t covered by a custom policy. Instead, create new, more restrictive policies for targeted, high-risk groups. Policies are processed by priority (0 being the highest), so a new custom policy with priority 0 will apply to its users, and the default policy will catch everyone else.

GUI Method: Inventory Existing Policies

  1. Navigate to the Microsoft Defender portal at https://security.microsoft.com.
  2. Go to Email & collaborationPolicies & rulesThreat policies.
  3. Under the Policies section, click on Anti-malware. You will see the default policy and any custom ones you have created.

PowerShell Method: Inventory Existing Policies

First, connect to Exchange Online.

PowerShell

# Connect to Exchange Online PowerShell
Connect-ExchangeOnline -UserPrincipalName <your-admin-email> -ShowProgress:$true

Then, view the current policies.

PowerShell

# Get all malware filter policies and their associated rules
Get-MalwareFilterPolicy
Get-MalwareFilterRule


3. Recommended Anti-malware Settings

This section details the recommended settings for your new custom anti-malware policy.

GUI Method: Creating a New Policy

  1. In the Microsoft Defender portal, go to the Anti-malware page from the previous step.
  2. Click Create a policy.
  3. Give the policy a descriptive Name (e.g., High-Risk Users - Anti-malware Policy) and a Description. Click Next.
  4. On the Users and domains page, choose the users, groups, or domains you want to protect. For our example, select Groups and search for ExecutiveTeam. Click Next.
  5. On the Protection settings page, configure the following:
    • Protection settings
      • Enable zero-hour auto purge for malware: This is a service-side feature that, when enabled, automatically removes previously delivered malicious messages from user mailboxes. It’s a key part of EOP and is highly recommended.
      • Quarantine policy: Use the default AdminOnlyAccessPolicy. The rationale is simple: end-users should not be able to release malware. This prevents them from accidentally or maliciously releasing a dangerous file.
    • Common attachments filter
      • Check Enable common attachments filter. This is a powerful, extension-based block list that is a fantastic first line of defence. The list of file types has been expanded by Microsoft, but you should periodically review it.
      • Click Customize file types and ensure a robust list of high-risk file types is selected. The list should include: exe, dll, js, jse, vbs, vbe, ps1, com, cmd, bat, jar, scr, reg, lnk, msi, msix, iso, img, 7z, zipx. You can also add other file types that are not needed in your environment, such as wsf, wsh, url.
    • Notifications
      • Admin notifications: Check Notify an admin about undelivered messages from internal senders and Notify an admin about undelivered messages from external senders. Use your security mailbox for this (e.g., security@contoso.com).
      • Sender notifications: Do not enable Notify internal sender or Notify external sender. Notifying external senders can validate their address for future spam, and an internal sender’s mailbox might be compromised, which could alert the attacker.

PowerShell Method: Creating and Configuring the Policy

This script is idempotent (you can run it multiple times without errors) and will create or update the policies as needed.

PowerShell

# --- PowerShell Script to Configure Exchange Online Anti-malware Policies ---

# Define variables for your tenant
$tenantDomain = "contoso.com"
$highRiskGroupName = "ExecutiveTeam"
$adminNotificationMailbox = "security@contoso.com"
$policyName = "High-Risk Users - Anti-malware Policy"
$ruleName = "High-Risk Users - Anti-malware Rule"

# Define the common attachment filter file types
$fileTypes = @(
    'ade','adp','ani','app','bas','bat','chm','cmd','com','cpl',
    'crt','csh','dll','exe','fxp','hlp','hta','inf','ins','isp',
    'jar','js','jse','ksh','lnk','mda','mdb','mde','mdt','mdw',
    'mdz','msc','msi','msix','msp','mst','pcd','pif','prg','ps1',
    'reg','scr','sct','shb','shs','url','vb','vbe','vbs','wsc',
    'wsf','wsh','xnk','iso','img','7z','zipx','docm','xlsm'
)

# Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName $adminNotificationMailbox -ShowProgress:$true

# Check if the policy exists
$policy = Get-MalwareFilterPolicy -Identity $policyName -ErrorAction SilentlyContinue

if ($null -ne $policy) {
    Write-Host "Policy '$policyName' already exists. Updating settings..." -ForegroundColor Yellow
    Set-MalwareFilterPolicy -Identity $policyName `
        -Action DeleteMessage `
        -EnableFileFilter:$true `
        -FileTypes $fileTypes `
        -EnableInternalSenderAdminNotifications:$true `
        -EnableExternalSenderAdminNotifications:$true `
        -AdminDisplayName "Custom policy for high-risk users."
} else {
    Write-Host "Policy '$policyName' not found. Creating a new one..." -ForegroundColor Green
    New-MalwareFilterPolicy -Name $policyName `
        -Action DeleteMessage `
        -EnableFileFilter:$true `
        -FileTypes $fileTypes `
        -EnableInternalSenderAdminNotifications:$true `
        -EnableExternalSenderAdminNotifications:$true `
        -AdminDisplayName "Custom policy for high-risk users."
}

# Check if the rule exists
$rule = Get-MalwareFilterRule -Identity $ruleName -ErrorAction SilentlyContinue

if ($null -ne $rule) {
    Write-Host "Rule '$ruleName' already exists. Updating settings..." -ForegroundColor Yellow
    Set-MalwareFilterRule -Identity $ruleName `
        -MalwareFilterPolicy $policyName `
        -Comments "Applies to high-risk group." `
        -SentToMemberOf $highRiskGroupName `
        -Priority 0
} else {
    Write-Host "Rule '$ruleName' not found. Creating a new one..." -ForegroundColor Green
    New-MalwareFilterRule -Name $ruleName `
        -MalwareFilterPolicy $policyName `
        -Comments "Applies to high-risk group." `
        -SentToMemberOf $highRiskGroupName `
        -Priority 0
}

Write-Host "Configuration complete. Run 'Get-MalwareFilterPolicy' and 'Get-MalwareFilterRule' to verify." -ForegroundColor Green


4. Defender for Office 365 Add-ons (If Licensed)

These advanced policies provide an additional layer of protection.

  • Safe Attachments: This sandboxing technology “detonates” email attachments in a virtual environment to detect zero-day malware.
    • Block: The most secure option. Messages with attachments are held while being scanned. If a threat is found, the message is blocked and quarantined. This can introduce a short delay (minutes) for emails with attachments.
    • Dynamic Delivery: A balance between security and user experience. The email body is delivered immediately with a placeholder for the attachment. The attachment is delivered once the scan is complete. Use this for users who can tolerate a minor delay on the attachment itself but need the email content right away. For a high-risk user group, Block is often the recommended setting.
  • Safe Links: This feature scans URLs at the time of the click, not just upon arrival. If a URL is later determined to be malicious, it will be blocked even if it was safe when the email was first received.
  • Zero-hour Auto Purge (ZAP): ZAP for malware is included in EOP and is enabled by default. MDO adds ZAP for high-confidence phishing and spam. This is a powerful, service-side feature that removes messages that have already been delivered to a user’s inbox if new threat intelligence indicates they are malicious. There is no per-policy PowerShell switch for this; its behaviour is managed by the service and the policy’s action on detection.

5. Quarantine Policies

Quarantine policies control what users can do with messages held in quarantine.

  1. Navigate to Email & collaborationPolicies & rulesThreat policies.
  2. Under Templates, click on Quarantine policies.
  3. The default quarantine policy for malware (AdminOnlyAccessPolicy) prevents end-users from releasing messages. This is the recommended setting. You can create a new policy and enable notifications or release requests for other threat types (e.g., spam), but for malware, keep it locked down.
  4. You can set up quarantine notifications (digests) for users, which provide a summary of messages in their quarantine.

6. Testing & Validation

Once your policies are configured, you must validate them.

The EICAR Test

Use a safe, legal test file to validate your policies. The EICAR (European Institute for Computer Antivirus Research) test file is a non-malicious file that all major anti-malware programs will detect.

  1. To test the Common Attachment Filter, create a plain text file, rename it to eicar.zip, and place the EICAR string X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* inside it.
  2. To test Safe Attachments, send a test email with the EICAR file attached (as a .zip or other container) to a user in your test group.

Verifying with Message Trace

  1. In the Microsoft Defender portal, go to Email & collaborationExchange message trace.
  2. Search for the test message.
  3. Click on the message to view details. The Event field should show a Fail status with the reason Malware.
  4. Header Analysis: You can also check the message headers. Look for the X-Forefront-Antispam-Report header and the SCL (Spam Confidence Level) and PCL (Phishing Confidence Level) values. A message blocked by an anti-malware policy will have a CAT (Category) entry indicating malware.

7. Ongoing Monitoring & Tuning

  • Threat Explorer (MDO P2) / Reports (EOP): Regularly review the Threat Explorer (or Reports for EOP) in the Microsoft Defender portal to see what threats are being blocked. This helps you identify trends, attack vectors, and potential false positives.
  • Configuration Analyzer: Located under Email & collaborationPolicies & rulesThreat policiesConfiguration analyzer, this tool compares your custom policies to Microsoft’s recommended Standard and Strict preset security policies. Use it to find and fix settings that are less secure than the recommended baselines.
  • ORCA Module: The Office 365 Recommended Configuration Analyzer (ORCA) is a community-developed PowerShell module that provides a comprehensive report of your M365 security posture. While not an official Microsoft tool, it’s an excellent resource for a deeper dive.
  • False Positive/Negative Submissions: If a legitimate message is blocked (false positive) or a malicious message gets through (false negative), you must submit it to Microsoft for analysis to improve their detection engines. The submission workflow is found under Actions & submissionsSubmissions in the Microsoft Defender portal.

8. Change Control & Rollback

  • Documentation: Always document any changes made to a policy, including the date, reason, and the specific settings changed.
  • Phased Rollout: When creating a new policy, first apply it to a small test group before rolling it out to production users.
  • Rollback: If you encounter issues, you can disable the custom policy in the GUI by toggling its status to Off or with PowerShell using Set-MalwareFilterRule -Identity "Rule Name" -State Disabled. You can also decrease its priority to ensure it no longer applies.

9. Final Checklist

Use this checklist to ensure all best practices have been implemented.

  • [ ] Prerequisites: Confirm M365 Business Premium or Defender for Office 365 licensing for advanced features.
  • [ ] Policy Strategy: Leave the default anti-malware policy untouched as a safety net.
  • [ ] New Policy: Create a new custom anti-malware policy for high-risk users/groups (e.g., ExecutiveTeam).
  • [ ] Action: Set the action for malware detection to Quarantine the message.
  • [ ] Common Attachment Filter: Enable and verify a comprehensive list of high-risk file extensions.
  • [ ] Admin Notifications: Configure admin notifications for malware detections.
  • [ ] Sender Notifications: Disable notifications for both internal and external senders.
  • [ ] Safe Attachments (if licensed): Configure a new policy and set the action to Block for high-risk users.
  • [ ] Safe Links (if licensed): Configure a new policy to scan URLs in emails at the time of click.
  • [ ] Quarantine Policies: Confirm the quarantine policy for malware is set to AdminOnlyAccessPolicy to prevent user releases.
  • [ ] Testing: Send a test email with a containerised EICAR file to a user in the new policy’s scope.
  • [ ] Validation: Use Message Trace to confirm the message was blocked, and review the headers for malware detection results.
  • [ ] Monitoring: Schedule a regular review of threat reports and submissions.
  • [ ] Tuning: Address false positives/negatives by submitting them to Microsoft.
  • [ ] Change Control: Document all changes and have a rollback plan in place.
  • [ ] Configuration Analyser: Run the Configuration Analyser and compare your policies to Microsoft’s recommended settings.

For more information, refer to these authoritative resources:

Set Exchange Online quarantine notification period

Many people have suspect emails sent to quarantine in Microsoft 365. This is achieved using a quarantine policy which you find at:

https://security.microsoft.com

image

You expand the options under Email & collaboration as shown above and select Policies and rules. On the right you select Threat policies as shown above.

image

If you scroll down the page a bit you’ll find Quarantine policies as shown above, which you should select.

image

The notification period is controlled in the GUI via the Global settings menu option as shown above.

image

From the dialog that appears from the right, scroll down to the bottom of the page and you will find an option Send end-user spam notifications as shown above. Presently, the minimum you can configure this to is Within 4 hours.

After you make any changes here select the Save button at the very bottom to update these settings for all the quarantine policies you have.

Check mailbox auditing settings using PowerShell

an art deco cartoon of someone doing an audit

An important part of good security in Microsoft 365 is to ensure you are capturing all the logs available. Exchange Online has a number of actions that can be audited and some may not be enabled in your environment. The list available and what is enabled by default can be found here:

Manage mailbox auditing

Here is a quick script you can run to display all the audit settings for each mailbox:

Get-OrganizationConfig | Format-List AuditDisabled
$mailboxes=get-mailbox -ResultSize unlimited
foreach ($mailbox in $mailboxes) {
     write-host “`nMailbox =”,$mailbox.userprincipalname
     write-host (“`— Admin —“)
     $mailbox | Select-Object -ExpandProperty AuditAdmin | Sort-Object
     write-host (“— Delegate —“)
     $mailbox | Select-Object -ExpandProperty AuditDelegate | Sort-Object
     write-host (“— Owner —“)
     $mailbox | Select-Object -ExpandProperty Auditowner | Sort-Object
}

Just compare the list in the link to what you have configured to ensure everything that is available to you is enabled.

To connect to Exchange online prior to running the above code you can use my script:

https://github.com/directorcia/Office365/blob/master/o365-connect-exo.ps1

Introduction to Exchange Online Protection

This video is the technical session from my May 2023 Need to Know webinar that focuses on helping people understand Microsoft 365. The aim is to help viewers get an overview of how Exchange Online Protection secures their environment and where they can go to made additional adjustments if required.

The session was recorded using Microsoft Teams.

You can find the slide deck for this session here – https://www.slideshare.net/directorcia/may-2023-ciaops-need-to-know-webinar

What to check with spoofed email in Microsoft 365

If you find that a spoofed email is reaching users inboxes in Microsoft 365 (say something like managing.director@gmail.com pretending to be managing.director@yourdomain.com) then here are some initial suggestions and things to check.

Firstly, ensure you have SPF, DKIM DMARC configured for your domain. They all help reduce spoofed emails getting to the inbox. 

Set up SPF to help prevent spoofing

Support for validation of DKIM signed messages

Use DMARC to validate email

Next, run the analyzer that is built into the Microsoft 365 Security Center to see where your policies may deviate from best practices.

Configuration analyzer for protection policies in EOP and Microsoft Defender for Office 365

and you’ll find those best practice settings here:

Recommended settings for EOP and Microsoft Defender for Office 365 security

I’d be checking against the strict rather than the standard settings if it was me.

image

In the settings for your spam policy in Exchange Online there are a few additional settings you can enable as shown above. Even though the Microsoft best practices doesn’t recommend it, I still have most of these set and at a minimum recommend that the SPF hard fail option be enabled.

image

In your Anti-phishing policies ensure the option for Show first contact safety tip is enabled as shown above. Microsoft Best Practice policies don’t set this. In general make sure all the above settings are all enabled as shown.

Another good indicator to configure is

Set-ExternalInOutlook -Enabled $true

using PowerShell, that will let you know about

Native external sender callouts on email in Outlook

Another custom adjustment you can consider is changing the Spam Confidence Level (SCL)

Spam Confidence level (SCL) in EOP

A further option you may wish to tweak beyond Microsoft’s recommended best practices is the phishing thresholds in anti-phishing policies:

Advanced phishing thresholds in anti-phishing policies in Microsoft Defender for Office 365 

When you get emails that are confirmed as trying to trick users, make sure you report them to Microsoft

How do I report a suspicious email or file to Microsoft?

Use the Submissions portal to submit suspected spam, phish, URLs, legitimate email getting blocked, and email attachments to Microsoft

Probably the best way to do that is to use the free add-in that works with Outlook.

Enable the Report Message or the Report Phishing add-ins

doing so helps build the intelligence for Exchange Online as well as helping others who may see similar insecure emails.

The final option available to you is always to reach out to Microsoft for assistance.

Get help or support for Microsoft 365 for business

I would also suggest you check any white listing options you may have in Exchange Online as these are easily forgotten over time. Best practice is not to white list any domain or specific email address but always check when you see repeated emails get through filtering. I can’t tell you how many times I find this as the cause of any issue. Keep in mind, there are few places that you can white list emails:

Create safe sender lists in EOP

You can of course also block the insecure sender:

Create blocked sender lists in EOP

Remember that if you tighten your email security the result will probably be an increase in false positives, at least initially, as Exchange Online learns to evaluate the changes and user behaviours based on the updated settings. Email security is not an exact science. The bad operators are working just as hard to bypass all these settings so it is always going to be a game of cat and mouse. However, hopefully, using the Microsoft recommended best practices and some additional tweaks as suggested above, you can prevent the vast majority of insecure emails out of your users email boxes.