Set-SenderFilterConfig
Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
Use the Set-SenderFilterConfig cmdlet to modify the Sender Filter configuration on a computer that has the Hub Transport server role or Edge Transport server role installed.
Syntax
Set-SenderFilterConfig [-Action <StampStatus | Reject>] [-BlankSenderBlockingEnabled <$true | $false>] [-BlockedDomains <MultiValuedProperty>] [-BlockedDomainsAndSubdomains <MultiValuedProperty>] [-BlockedSenders <MultiValuedProperty>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Enabled <$true | $false>] [-ExternalMailEnabled <$true | $false>] [-Instance <SenderFilterConfig>] [-InternalMailEnabled <$true | $false>] [-WhatIf [<SwitchParameter>]]
Detailed Description
To run the Set-SenderFilterConfig cmdlet, the account you use must be delegated the following:
- Exchange Server Administrator role and local Administrators group for the target server
To run the Set-SenderFilterConfig cmdlet on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.
For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Action |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.BlockedSenderAction |
This parameter specifies the action that the Sender Filter agent takes on the message when a blocked sender or domain is found. The Action parameter takes the following values: |
BlankSenderBlockingEnabled |
Optional |
System.Boolean |
Valid input for the BlankSenderBlockingEnabled parameter is |
BlockedDomains |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
Valid input for the BlockedDomains parameter is one or more domain names. When the Sender Filter agent encounters a message that has been sent from a domain on this list, the Sender Filter agent takes the action that is specified in the Action parameter. Wildcard characters, such as '*', are permitted. The maximum number of entries for this parameter is 800. |
BlockedDomainsAndSubdomains |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
Valid input for the BlockedDomainsAndSubdomains parameter is one or more domain names. When the Sender Filter agent encounters a message that has been sent from a domain or a subdomain on this list, the Sender Filter agent takes the action that is specified in the Action parameter. Wildcard characters, such as '*', are permitted. The maximum number of entries for this parameter is 800. |
BlockedSenders |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
Valid input for the BlockedSenders parameter is one or more SMTP addresses. When the Sender Filter agent encounters a message that has been sent by a sender on this list, the Sender Filter agent takes the action that is specified in the Action parameter. The maximum number of entries for this parameter is 800. |
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter on the command. The DomainController parameter is not supported on computers that have the Edge Transport server role installed. The Edge Transport server role writes only to the local ADAM instance. |
Enabled |
Optional |
System.Boolean |
Valid input for the Enabled parameter is |
ExternalMailEnabled |
Optional |
System.Boolean |
Valid input for the ExternalMailEnabled parameter is |
Instance |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.SenderFilterConfig |
The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command. |
InternalMailEnabled |
Optional |
System.Boolean |
Valid input for the InternalMailEnabled parameter is |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter. |
Input Types
Return Types
Errors
Error | Description |
---|---|
|
Example
The following code example shows a Set-SenderFilterConfig command that has the following modifications to the Sender Filter configuration:
It enables blocking of blank senders.
It blocks the domain and subdomain of example.com
It defines two blocked senders.
Set-SenderFilterConfig -BlankSenderBlockingEnabled:$true -BlockedDomainsAndSubdomains *example.com -BlockedSenders user1@contoso.com, user2@contoso.com