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

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
主站蜘蛛池模板: 龙口市| 武乡县| 望都县| 晋江市| 巫山县| 田阳县| 邵阳市| 舟山市| 万全县| 惠水县| 石门县| 乌拉特前旗| 通道| 四川省| 东宁县| 抚顺市| 慈溪市| 祁阳县| 射洪县| 永兴县| 轮台县| 图们市| 新丰县| 长治市| 临颍县| 林西县| 太白县| 开化县| 平昌县| 甘肃省| 台前县| 积石山| 崇义县| 深圳市| 中西区| 内丘县| 都昌县| 随州市| 镇宁| 宁蒗| 舞阳县|