Add Email address or Domain to Exchange Spam whitelist Powershell
Having a Quarantine mailbox which an internal user can then manage can be really useful. Mainly because they know their business better and which type of emails they should be accepting.
However there are times when legitimate emails from the same Sender or Domain keeps getting put in quarantine for various reasons, quite a lot of the time it’s because of the senders setup not being setup correctly, incorrect SPF or rDNS for example.
Here I’ll show you how to create a list of either email addresses or domains which you’d like to bypass the set spam filter in Exchange.
First off, open up the Microsoft Exchange Powershell prompt.
Allow Sender Domains:
$domainlist = (Get-ContentFilterConfig).BypassedSenderDomains — This creates a list called “domainlist”
$domainlist.add(“domain.com”) —- This adds said “domain.com” to the “domainlist” list
Set-ContentFilterConfig -BypassedSenderDomains $domainlist — This confirms and writes the data to the ContentFilterConfig
Example: (Here I’ve added two domains to bypass the Content Filter.)
$domainlist = (Get-ContentFilterConfig).BypassedSenderDomains
Set-ContentFilterConfig -BypassedSenderDomains $domainlist
Allow Sender Email addresses:
$list = (Get-ContentFilterConfig).BypassedSenders — This creates a list called “list”
$list.add(“email@example.com”) —- This adds said “firstname.lastname@example.org” to the “list” list
Set-ContentFilterConfig -BypassedSenders $list — This confirms and writes the data to the ContentFilterConfig
Example: (Here I’ve added two email addresses to bypass the Content Filter.)
$list = (Get-ContentFilterConfig).BypassedSenders
Set-ContentFilterConfig -BypassedSenders $list
To see the contents of your lists use the command: Get-ContentFilterConfig
Hope this gets you out of a sticky Quibble