Hi @Glenn Brown
Thank you for posting your question in the Microsoft Q&A forum.
Based on your inquiry, we understand that you have considered an Error announcement while configuring in anti-spam policies . We will be glad to assist you in this part.
As my research, may concern to Microsoft Defender configuration.
However, I have found the article which relevant to your issue.
Configure spam filter policies - Microsoft Defender for Office 365 | Microsoft Learn
You could try these constructions to work around block senders and domain by using PowerShell:
1.Connect to Exchange Online PowerShell
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline
- To return a summary list of all spam filter policies run this command:
Get-HostedContentFilterPolicy
3.To return detailed information about a specific spam filter policy, use this syntax:
Get-HostedContentFilterPolicy -Identity "the policy name" | Format-List
- You can set to put in the sender and domain in the list
Set-HostedContentFilterPolicy -Identity "the policy nam" -BlockedSenderDomains @{add="company.com"}
Please let me know if you need further assistance, please let us know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.