diff --git a/deploy-spamfilter-connector.ps1 b/deploy-spamfilter-connector.ps1 index 460a5ac..2a3cd62 100644 --- a/deploy-spamfilter-connector.ps1 +++ b/deploy-spamfilter-connector.ps1 @@ -5,4 +5,4 @@ $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 -ConnectorType OnPremises \ No newline at end of file +New-InboundConnector -Name $using:connector_name -SenderDomains {smtp:*;1} -EFSkipIPs $using:spamfilterips -RestrictDomainsToCertificate $true -RequireTLS $true -TlsSenderCertificateName $using:hostname -CloudServicesMailEnabled $true -ConnectorType OnPremises \ No newline at end of file diff --git a/mass-deploy-spamfilter-connector.ps1 b/mass-deploy-spamfilter-connector.ps1 index 61b8b2e..572037f 100644 --- a/mass-deploy-spamfilter-connector.ps1 +++ b/mass-deploy-spamfilter-connector.ps1 @@ -1,5 +1,5 @@ # Set up command to run and vars for that command -$ScriptBlock = {New-InboundConnector -Name $connector_name -SenderDomains {smtp:*;1} -EFSkipIPs $spamfilterips -RestrictDomainsToCertificate $true -RequireTLS $true -TlsSenderCertificateName $hostname -CloudServicesMailEnabled $true -ConnectorType OnPremises} +$ScriptBlock = {New-InboundConnector -Name $using:connector_name -SenderDomains {smtp:*;1} -EFSkipIPs $using:spamfilterips -RestrictDomainsToCertificate $true -RequireTLS $true -TlsSenderCertificateName $using:hostname -CloudServicesMailEnabled $true -ConnectorType OnPremises} $connector_name = 'Spamfilter Connector' $hostname = 'spamgateway.aperturect.com'