[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1579
  • Last Modified:

Add multiple domains to Blocked Senders in Exchange 2007

Is there a way to add a list of domains to Blocked Senders in Exchange 2007 without having to individually add them.  In other words, is there a way to import a list, either through the console or the Powershell, where the list could be edited outside Exchange and then imported.  I can easily cut and paste a list together but typing individual domain names/email addresses would take too much time.  Thanks.
0
rstorm1
Asked:
rstorm1
  • 3
  • 2
1 Solution
 
halejr1Commented:
Haven't tested it yet but plan on doing the same thing -- instructions below:

Run the install-AntispamAgents.ps1 script on the Edge server, you can find it in C:\Program Files\Microsoft\Exchange Server\Scripts.
Now restrat the Exchange Transport service for changes to take effect.

PS > Restart-Service MSExchangeTransport

You can see the installed agents in Exchange Managment Console under: Organization Configuration | Hub Transport | Anti-Spam (tab).
To import the blocked domain url's to the Sender Filtering agent:

# block messages that do not contain a sender.
Set-SenderFilterConfig -BlankSenderBlockingEnabled:$true


# block messages for a list of domains including their subdomains
# sample domain urls
example.com
virus.com

Set-SenderFilterConfig -BlockedDomainsAndSubdomains (Get-Content c:\blocked.txt)
Run the install-AntispamAgents.ps1 script on the Edge server, you can find it in C:\Program Files\Microsoft\Exchange Server\Scripts.
Now restrat the Exchange Transport service for changes to take effect.

PS > Restart-Service MSExchangeTransport

You can see the installed agents in Exchange Managment Console under: Organization Configuration | Hub Transport | Anti-Spam (tab).
To import the blocked domain url's to the Sender Filtering agent:

# block messages that do not contain a sender.
Set-SenderFilterConfig -BlankSenderBlockingEnabled:$true


# block messages for a list of domains including their subdomains
# sample domain urls
example.com
virus.com

Set-SenderFilterConfig -BlockedDomainsAndSubdomains (Get-Content c:\blocked.txt)



0
 
halejr1Commented:
sorry .. double posted.... ughhh!
0
 
rstorm1Author Commented:
Excellent, thanks.  Will try as soon as possible.
0
 
halejr1Commented:
rstorm1 -- how did it go????
0
 
rstorm1Author Commented:
I have not been able to test this yet, but don't want to leave the question hanging any longer.  Problem is, I don't have a spare Exchange box to test on before running in production and am going to have to put one together in all my spare time.  Too many fires to stomp!  Thanks for your help, I will try this when I can get another Exchange server set up.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now