This topic describes scenarios you might encounter when configuring and managing your Exchange Gateway and Exchange Server configuration, and when you might want to expand on the minimum configuration.
From the Clearswift SXG Interceptor Management Shell, type the following:
Get-SXGInterceptor
From the Clearswift SXG Interceptor Management Shell, type the following:
Remove-SXGGateway GW1
To enable an SXG Interceptor called HUB1.example.com, from the Clearswift SXG Interceptor Management Shell, type the following:
Set-SXGInterceptor -Identity HUB1.example.com -Enabled $true
To disable an SXG Interceptor called HUB1.example.com, from the Clearswift SXG Interceptor Management Shell, type the following:
Set-SXGInterceptor -Identity HUB1.example.com -Enabled $false
From the Clearswift SXG Interceptor Management Shell, type the following:
Get-SXGMessage -Interceptor HUB1.example.com -IncludeSubject | Sort-Object Gateway
From the Clearswift SXG Interceptor Management Shell, type the following:
Get-SXGMessage -Interceptor HUB1.example.com -IncludeSubject | Format-Table Sender, Recipients, Subject
The following command will retrieve mail that has been queued for more than 5 minutes.
From the Clearswift SXG Interceptor Management Shell, type the following:
Get-SXGInterceptor | get-SXGMessage | where {$_.QueuedDuration -ge "00:05:00"}
You use the Set-SXGInterceptionRules cmdlet from from the Clearswift SXG Interceptor Management Shell to configure how your SXG Interceptor behaves. The following table lists common scenarios and the cmdlet parameters you need to use:
Scenario | Parameter to use |
---|---|
I want to control the interception of mail from the local store. | -InterceptorLocalOnly <$true|$false> |
I want to validate addresses in the address list before they are used. | -ValidateAddresses <$true|$false> |
I want to control the interception of mail where there is no sender, for example NDRs. | -InterceptEmptySenders <$true|$false> |
I have servers that I trust to send mail through this Exchange Server without policy being applied. | -TrustedHosts <String[]> |
I need a convenient way of adding a long list of trusted hosts. |
-TrustedHosts (Get-Content FilewithTrustedHosts.txt) where FilewithTrustedHosts.txt contains each host on a new line. |
I have set the SXG Interceptor to not intercept mail from a list of trusted sites but now I want to clear this list. | -TrustedHosts @() |
I want to be able to control what happens to mail when the SXG Interceptor fails to process it. | -FailureAction <Deliver|Delete|NonDeliver] |
I want to control what happens when the SXG Interceptor processes mail that matches a particular message class list. |
Use the following in conjunction: -MessageClassLogic <DoNotIntercept|Intercept|NotUsed> -MessageClassList <String[]> |
I want to be able to control what happens when the SXG Interceptor processes mail for particular recipients. |
Use the following in conjunction: -RecipientAddressLogic <DoNotIntercept|Intercept|NotUsed> -RecipientAddressList <String[]> |
I want to be able to control what happens when the SXG Interceptor processes mail for recipients on a particular domain. |
Use the following in conjunction: -RecipientDomainLogic <DoNotIntercept|Intercept|NotUsed> -RecipientDomainList <String[]> |
I want to be able to control what happens when the SXG Interceptor processes mail from a particular sender. |
Use the following in conjunction: -SenderAddressLogic <DoNotIntercept|Intercept|NotUsed> -SenderAddressList <String[]> |
I want to be able to control what happens when the SXG Interceptor processes mail for a particular sender domain. |
Use the following in conjunction: -SenderDomainLogic <DoNotIntercept|Intercept|NotUsed> -SenderDomainList <String[]> |
I want to apply my interception rules to particular sites only. | -AssignedSites <String[]> |
The following command will set all rule configurations to not intercept mail sent to support mailboxes at example.com. From the command line, type the following:
Set-SXGnterceptionRules -RecipientAddressLogic DoNotIntercept -RecipientAddressList support*@example.com
The following command sets the Site1Rules configuration to only intercept mail sent from userA@example.com and userB@example.com. From the command line, type the following:
Set-SXGnterceptionRules Site1Rules -SenderAddressLogic Intercept -SenderAddressList userA@example.com, userB@example.com
The following command sets all rule configurations to intercept all mail to example.com. From the command line, type the following:
Set-SXGnterceptionRules -RecipientDomainLogic Intercept -RecipientDomainList example.com
Decide on a name for the set of rules and add it.
In this example MyRuleSet is used. From the Clearswift SXG Interceptor Management Shell type the following:
Add-SXGInterceptionRules -Identity MyRuleSet
Set the rules for MyRuleSet and assign the set to the site.
In this example mail recipients userA@example.com and userB@example.com will be intercepted, and the rule set is assigned to Site1.
Set-SXGInterceptionRules -Identity MyRuleSet -RecipientAddressLogic Intercept -RecipientaddressList userA@example.com,userB@example.com -AssignedSites Site1
The following command copies MyRuleSet to MyNewRuleSet:
Copy-SXGInterceptionRules -Identity MyRuleSet -TargetIdentity MyNewRuleSet
For Windows event logging, SXG Interceptor events are written to the Application log with a source of Clearswift SXG Interceptor.
SXG Interceptor log files can be found in the C:\ProgramData\Clearswift\SXGInterceptor\Logs directory.