官术网_书友最值得收藏!

Configuring message delivery restrictions

Since distribution groups contain multiple members, you may want to place restrictions on who can send messages to these recipients. Exchange allows you to tightly control these settings and provides several options when it comes to placing message delivery restrictions on groups. We can also place restrictions on other recipient types in the organization. This recipe will show you how to configure these options from the Exchange Management Shell.

How to do it...

Let's see how to configure restrictions on message delivery using the following steps:

To restrict who can send messages to a group, use the Set-DistributionGroup cmdlet:

Set-DistributionGroup -Identity Sales `
-AcceptMessagesOnlyFrom 'Bob Smith','John Jones'

After running this command, only the users Bob Smith and John Jones can send messages to the Sales distribution group.

How it works...

The -AcceptMessagesOnlyFrom parameter allows you to specify one or more recipients who are allowed to send messages to a distribution group. These recipients can be regular users with mailboxes or contacts.

You can add inpidual recipients and distribution groups to the accepted senders list, using the following syntax:

Set-DistributionGroup -Identity Sales `
-AcceptMessagesOnlyFromSendersOrMembers Marketing,bob@contoso.com

In this example, we're allowing both the Marketing distribution group and Bob, an inpidual recipient, to the accepted senders list for the Sales distribution group. Doing so will allow Bob and any members of the Marketing distribution group to send messages to the Sales group.

When using these parameters, keep in mind that any existing accepted recipients that have been configured will be overwritten. For example, to see how to add a new item to a multivalued property, see the section Working with arrays and hash tables in Chapter 1, PowerShell Key Concepts.

Delivery restrictions can be placed on any recipient, whether it's a mailbox, mail contact, mail user, distribution group, or mail-enabled public folder. The Set-* cmdlets for each of these recipient types can be used to configure delivery restrictions. To view the list of cmdlets that can be used to do this, run the following command:

get-excommand | ?{$_.parameters.keys -eq 'AcceptMessagesOnlyFrom'}

If you need to add a large list of users to the accepted senders list, you can create a collection and assign it to the -AcceptMessagesOnlyFrom parameter:

$finance = Get-Mailbox -Filter {Office -eq 'Finance'}
Set-DistributionGroup -Identity Sales `
-AcceptMessagesOnlyFrom $finance

You can wipe out these settings and allow messages from all senders by setting the value to $null:

Set-DistributionGroup -Identity Sales `
-AcceptMessagesOnlyFromSendersOrMembers $null

Similar to the previous examples, we can reject messages from a specific user or member of a distribution list using the -RejectMessagesFromSendersOrMembers parameter:

Set-DistributionGroup -Identity Executives `
-RejectMessagesFromSendersOrMembers HourlyEmployees

In this example, Exchange will reject any message sent from a member of the HourlyEmployees distribution group to the Executives group.

There's more...

When you create a distribution group, the default configuration is to reject messages from senders who are not authenticated. This means that users outside your organization will not be able to send messages to your distribution groups. Generally, this is the desired configuration, but if needed, you can modify this setting on a distribution group to accept messages from external users using the following syntax:

Set-DistributionGroup -Identity HelpDesk `
-RequireSenderAuthenticationEnabled $false

You can see here that we have disabled sender authentication for the HelpDesk distribution group. You can re-enable it at any time by setting the previous parameter value to $true.

See also

  • Managing distribution groups
主站蜘蛛池模板: 类乌齐县| 濉溪县| 济源市| 抚顺县| 天祝| 南城县| 华阴市| 巴林左旗| 保山市| 台南县| 通榆县| 绍兴县| 茶陵县| 香格里拉县| 仙游县| 正阳县| 崇信县| 定安县| 大庆市| 云梦县| 来宾市| 西丰县| 同江市| 阿克| 镇坪县| 得荣县| 鲁甸县| 丁青县| 四川省| 石棉县| 浮梁县| 开封市| 虞城县| 乡宁县| 威信县| 于都县| 拉孜县| 乌兰察布市| 牡丹江市| 高雄县| 乌拉特后旗|