電子郵件地址政策無效

電子郵件地址政策無效

我已經設定了一個接受域,後台的所有操作都已完成,我正在使用以下命令設定郵件策略:

New-EmailAddressPolicy -Name “x.com” -IncludedRecipients “MailboxUsers” -ConditionalCompany “xx” -Priority “Lowest” -EnabledEmailAddressTemplates “SMTP:%g.%[email protected]

我收到以下錯誤

New-EmailAddressPolicy : Cannot convert SMTP:%g.%[email protected] to the type Microsoft.Exchange.Data.ProxyAddressTemplateCollection required by parameter 'EnabledEmailAddressTemplates'. Cannot perform this operation with the address 'SMTP:%g.%[email protected] because it is invalid: The SMTP e-mail address template "%g.%[email protected] " is invalid.At line:1 char:174+ New-EmailAddressPolicy-Name "xz.com" -IncludedRecipients "MailboxUsers" -ConditionalCompany "xz" -Priority "Lowest" -EnabledEmailAddressTemplates <<<<  "SMTP:%g.%[email protected] "+ CategoryInfo: InvalidArgument: (:) [New-EmailAddressPolicy], ParameterBindingException+ FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Exchange.Managem  ent.SystemConfigurationTasks.NewEmailAddressPolicy

我已將新的接受域設定為權威域類型。

答案1

字串末尾有一個空格:。當你將其更改為它應該可以工作。“SMTP:%g.%[email protected] ""SMTP:%g.%[email protected]"

相關內容