From 3801a1682826dc46a67f9784bccdd9b842eb2024 Mon Sep 17 00:00:00 2001 From: "Jeremy D. Berkleef" Date: Mon, 9 Aug 2021 09:42:48 -0300 Subject: [PATCH] Add spamfilter deployment script --- README.md | 1 + deploy-spamfilter-connector.ps1 | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 deploy-spamfilter-connector.ps1 diff --git a/README.md b/README.md index 0859461..b351cb1 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,6 @@ This repo contains various scripts used for management tasks (and migrations) on # Scripts - [**Alias Toolkit**](Docs/alias-toolkit.md) - Easy to use, menu-based script for searching for, exporting and importing aliases from/to Exchange (Online). +- **Spam Filter Deployment Script** - Script to create the Connector and Enhanced Filtering rule for a spam gateway. - **List alias .csv contents** - _This has been integrated into Alias Toolkit._ - **Search Email Addresses** - _This has been integrated into Alias Toolkit._ diff --git a/deploy-spamfilter-connector.ps1 b/deploy-spamfilter-connector.ps1 new file mode 100644 index 0000000..1a0bbb8 --- /dev/null +++ b/deploy-spamfilter-connector.ps1 @@ -0,0 +1,8 @@ +Connect-ExchangeOnline + +# Options +$connector_name = 'Spamfilter Connector' +$hostname = 'spamgateway.aperturect.com' +$spamfilterips = {127.0.0.1}, {127.0.0.2} +# Create connector for spam filter and enable EF +New-InboundConnector -Name $connector_name -SenderDomains {smtp:*;1} -EFSkipIPs $spamfilterips -RestrictDomainsToCertificate $true -RequireTLS $true -TlsSenderCertificateName $hostname -CloudServicesMailEnabled $true \ No newline at end of file