How to Set Mailbox Junk Mail Configuration in Office 365

This article shows you how to set up junk mail settings for a mailbox on Office 365.

Need to know how to connect - how to connect to Office 365 using Powershell

1. Get the current configuration for the mailbox

Get-MailboxJunkEMailConfiguration -Identity "Your Mailbox" | Format-List

Or just the Junk Mail details using

(Get-MailboxJunkEMailConfiguration -Identity "Your Mailbox").BlockedSendersAndDomains

2. Add your blocked senders using the command

Set-MailboxJunkEMailConfiguration –Identity "Your Mailbox" –BlockedSendersAndDomains @{Add="JunkMailEmailOrDomain@spam.online"}

3. View your configuration again

Return to Category