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

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
主站蜘蛛池模板: 伊宁县| 同江市| 察雅县| 绥德县| 黎城县| 郑州市| 花垣县| 安塞县| 南通市| 鄢陵县| 阳江市| 沂水县| 湖州市| 青州市| 本溪市| 阿拉善右旗| 沭阳县| 调兵山市| 白城市| 昌江| 遵义县| 屏山县| 烟台市| 鄂伦春自治旗| 德令哈市| 新龙县| 高台县| 桑植县| 吴桥县| 泌阳县| 特克斯县| 南川市| 车险| 汉川市| 鄂托克旗| 北流市| 门头沟区| 建宁县| 隆子县| 屯门区| 巴里|