我已经设置了一个接受的域名,在后台执行了所有的操作,我正在使用以下命令设置邮件策略:
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
我已经将新的接受域设置为权威域types。
在string末尾有一个空格: “SMTP:%g.%[email protected] " ,当你把它改成"SMTP:%g.%[email protected]"它应该可以工作。