我已经设置了一个接受域,后台的一切都完成了,我正在使用以下命令设置邮件策略:
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
我已将新的接受域设置为权威域类型。
字符串末尾有一个空格:
“SMTP:%g.%[email protected] "
. 当您将其更改为"SMTP:%g.%[email protected]"
它应该可以工作。