An administrator wanted to know if he could set up global safe and blocked lists for distribution to his users.
Is there a way to set a Global Safe Sender List for everyone in Exchange Online?
Yes, you have two options: you can add domains and addresses to the safe or blocked lists in the Exchange admin center or you can add addresses to the user's Junk mail lists in Outlook. If you block the addresses in Exchange, you can add words to the message header ("[Spam]") or delete the spam before it gets to the user's mailbox. If you add the addresses to Outlook, mail will be moved to the Junk Email folder (unless the user has Outlook configured to delete junk email).
Exchange admin center
To block domains in the Exchange admin center, log in then go to Protection and select spam filter. Open the default list and add addresses and domains to the blocked lists. If any domains or addresses that should be trusted are routinely marked as spam, add them to the allow lists to bypass filtering. Choose how to handle the spam at the top of spam and bulk actions. Tip: If you create a new list, you can apply it to specific users.
Add to Outlook's Safe or Blocked lists
If you prefer to add domains and addresses to a user's lists in Outlook, use the Set-MailboxJunkEmailConfiguration cmdlet to create lists for individual users or use it in conjunction with the Get-Mailbox cmdlet to add the addresses to all mailboxes.
To add addresses and domains to the user's junk mail lists in Outlook without affecting entries already on the list, use the following cmdlet.
Set-MailboxJunkEmailConfiguration user@mydomain.com -BlockedSendersAndDomains @{Add=" @baddomain.com"} -TrustedSendersAndDomains @{Add="gooddomain.com","sally@safedomain.com"}
For new mailboxes or to replace existing lists, use this cmdlet. Note that double quotes around the domain and email addresses is optional with the cmdlet; they are required when using Add.
Set-MailboxJunkEmailConfiguration -Identity user@slipstick.com -BlockedSendersAndDomains "baddomain.com","alias@domain2.com" -TrustedSendersAndDomains "good-domain.com","alias@trusted.com"
Remember: using this cmdlet will replace the user's own lists with the domains you add. Use the one with @Add if you want to add to the user's list.
To check the settings, use:
Get-MailboxJunkEmailConfiguration -Identity user@slipstick.com
To add address to the lists in all mailboxes, use
Get-Mailbox | Set-MailboxJunkEmailConfiguration -BlockedSendersAndDomains @{Add="domain1.com", "user@domain2.com"}-TrustedSendersAndDomains @{Add="domain3.com","user@domain4.com"}
To replace lists, don't wrap @{Add= } around the addresses and domains:
Get-Mailbox | Set-MailboxJunkEmailConfiguration -Identity user@slipstick.com -BlockedSendersAndDomains "baddomain.com,"alias@domain2.com" -TrustedSendersAndDomains "good-domain.com","alias@trusted.com"
If your organization is large, you may want to spot check a few accounts, but smaller organizations can check all mailboxes using
Get-Mailbox | Get-MailboxJunkEmailConfiguration
More Information
Set-MailboxJunkEmailConfiguration (TechNet)
It was very useful for me too! Thanks!
Immensely useful and works a treat, thank you Diane