Email Address Policy doesn't apply base on UPN
Good Day, I have 1 EAP on priority 1 name "company.com" I'd create 2nd EAP as per below on Exchange 2010 SP2 & UPN "testdomain.com" at ADD&T New-EmailAddressPolicy -Name 'testdomain.com' -EnabledEmailAddressTemplates 'SMTP:%g%s@testdomain.com' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (UserPrincipalName -like '*testdomain.com'))} When I create new user "testuser" and select UPN testdomain.com, the primary SMTP wasn't @testdomain.com, but it pick EAP 1 which is "@company.com" Automatically update email addresses based on email address policy was check Is that something I'd missed out?
April 11th, 2012 7:48am

Was the UPN selected or used at create time or was the UPN switched after the user was created? Does this user exist in the same domain or are you using alternate UPNs in the same domain?
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2012 8:19am

Hi Russ, UPN was selected during create of account. User exist on same domain Thanks
April 11th, 2012 9:27am

To Add On, When I I open the testdomain in the EMC and click the Preview button, I can see testusers shown up
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2012 10:02am

Is testdomain.com in your accepted domains list? An email domain in an EAP must be an accepted domain before it can be used. Also, in creating OPATH filters, I found that RecipientType does not work that well, try {((RecipientTypeDetails -eq 'UserMailbox') -and (UserPrincipalName -like '*@testdomain.com'))} and if you need any other specific types included, you can use -or like below. {(((RecipientTypeDetails -eq 'UserMailbox') -or (RecipientTypeDetails -eq 'MailUser')) -and (UserPrincipalName -like '*@testdomain.com'))}
April 11th, 2012 10:39am

Hi Russ, testdomain.com is under Acept Domain list. I try your method by set-EmailAddressPolicy -identity 'testdomain.com' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (UserPrincipalName -like '*@testdomain.com'))} and follow by Update-EmailAddressPolicy -identity 'testdomain.com' I can see testuser under preview list on EAP of testdomain but it still doesnt pickup testdomain.com EAP. It just pick from 1st EAP (Company.com) which Policy contains: All recipient types We have all EAP working on Exch2003, and after convert EAP to Exchange2010 it stop working
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2012 1:25am

If your UPN is "testdomain.com', you can use this to have a try: New-EmailAddressPolicy -Name "TestPolicy" -RecipientFilter {UserPrincipalName -like "*@testdomain.com"} -EnabledPrimarySMTPAddressTemplate SMTP:@testdomain.com Here is a related document for you: New-EmailAddressPolicy http://technet.microsoft.com/en-us/library/aa996800.aspx Thanks, EvanEvan Liu TechNet Community Support
April 12th, 2012 6:08am

Still same, it just doens't pick the right EAP. I try to pull the info from PS and shown correct UPN applied. [PS] C:\Windows\system32>Get-EmailAddressPolicy -Identity testpolicy | fl RunspaceId : d05e1843-b1f9-4fb4-9676-5b30d6bc99e2 RecipientFilter : UserPrincipalName -like '*@testdomain.com' LdapRecipientFilter : (userPrincipalName=*@testdomain.com) LastUpdatedRecipientFilter : UserPrincipalName -like '*@testdomain.com' RecipientFilterApplied : True IncludedRecipients : ConditionalDepartment : {} ConditionalCompany : {} ConditionalStateOrProvince : {} ConditionalCustomAttribute1 : {} ConditionalCustomAttribute2 : {} ConditionalCustomAttribute3 : {} ConditionalCustomAttribute4 : {} ConditionalCustomAttribute5 : {} ConditionalCustomAttribute6 : {} ConditionalCustomAttribute7 : {} ConditionalCustomAttribute8 : {} ConditionalCustomAttribute9 : {} ConditionalCustomAttribute10 : {} ConditionalCustomAttribute11 : {} ConditionalCustomAttribute12 : {} ConditionalCustomAttribute13 : {} ConditionalCustomAttribute14 : {} ConditionalCustomAttribute15 : {} RecipientContainer : RecipientFilterType : Custom Priority : 13 EnabledPrimarySMTPAddressTemplate : @testdomain.com EnabledEmailAddressTemplates : {SMTP:@testdomain.com} DisabledEmailAddressTemplates : {} Enabled : False HasEmailAddressSetting : True HasMailboxManagerSetting : False NonAuthoritativeDomains : {} AdminDescription : AdminDisplayName : ExchangeVersion : 0.1 (8.0.535.0) Name : TestPolicy DistinguishedName : CN=TestPolicy,CN=Recipient Policies,CN=company,CN=Microsoft Exchange,CN=Service s,CN=Configuration,DC=company,DC=com Identity : TestPolicy Guid : 21c6dfed-3324-4fbd-8a25-6583458531e7 ObjectCategory : company.com/Configuration/Schema/ms-Exch-Recipient-Policy ObjectClass : {top, msExchGenericPolicy, msExchRecipientPolicy} WhenChanged : 12/4/2012 6:31:53 PM WhenCreated : 12/4/2012 6:31:28 PM WhenChangedUTC : 12/4/2012 10:31:53 AM WhenCreatedUTC : 12/4/2012 10:31:28 AM OrganizationId : OriginatingServer : DC02.company.com IsValid : True [PS] C:\Windows\system32>get-mailbox 'testuser2@testdomain.com' | fl User*, Email* UserPrincipalName : testuser2@testdomain.com UserSMimeCertificate : {} UserCertificate : {} EmailAddresses : {smtp:testuser2@company.com, X400:C=US;A= ;P=company;O=Exchange;S=user2;G=test;, SMTP:test2@company.com} EmailAddressPolicyEnabled : True Thanks for help...
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2012 6:47am

[PS] C:\Windows\system32>get-mailbox 'testuser2@testdomain.com' | fl User*, Email* UserPrincipalName : testuser2@testdomain.com UserSMimeCertificate : {} UserCertificate : {} EmailAddresses : {smtp:testuser2@company.com, X400:C=US;A= ;P=company;O=Exchange;S=user2;G=test;, SMTP:test2@company.com} EmailAddressPolicyEnabled : True Thanks for help... I see your EmailAddresses didn't have email address for "@testdomain.com". Do you have email address for "@testdomain.com"? If not, you need use Email address policy to add email address for "@testdomain.com". If you have, please go to apply TestPoliy and Default Poliy again, then check for the issue. Thanks, EvanEvan Liu TechNet Community Support
April 12th, 2012 7:13am

Not only that, he needs to look into the EAP again, several lines are concerning. First off, the IncludedRecipients is empty. This policy would not apply to anything since the policy is not instructed to apply to any recipient types. Second, the EnabledEmailAddressTemplate is set to {SMTP:@testdomain.com} instead of {SMTP:%g%s@testdomain.com} (just an observation) Lastly, it appears as if the policy is disabled signified by Enabled: False I dont think your issue has anything to do with your recipient filter at all, I believe it is because you did not specify IncludedRecipients and it is disabled.
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2012 9:00am

I see your EmailAddresses didn't have email address for "@testdomain.com". Do you have email address for "@testdomain.com"? If not, you need use Email address policy to add email address for "@testdomain.com". If you have, please go to apply TestPoliy and Default Poliy again, then check for the issue. Hi Evan, That's why I raise this, I would like to use EAP apply email address base on UPN, but the get-mailbox results for testusers EmailAddresses wasn't pick from testdomain UPN, instead EAP Priority 1 which is company.com
April 12th, 2012 10:50am

First off, the IncludedRecipients is empty. This policy would not apply to anything since the policy is not instructed to apply to any recipient types. Second, the EnabledEmailAddressTemplate is set to {SMTP:@testdomain.com} instead of {SMTP:%g%s@testdomain.com} (just an observation) Lastly, it appears as if the policy is disabled signified by Enabled: False Hi Russ, IncludedRecipients is empty because I use Evan suggest New-EmailAddressPolicy -Name "TestPolicy" -RecipientFilter {UserPrincipalName -like "*@testdomain.com"} -EnabledPrimarySMTPAddressTemplate SMTP:@testdomain.com, I had changed -EnabledPrimarySMTPAddressTemplate SMTP:%s@testdomain.com But results still same. Lastly, how can I change the Enabled to True
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2012 10:54am

Hello, How did you create for the EAP1, could you post the commands? What the result of this command: Get-EmailAddressPolicy You also can follow these steps to have a try: <1>Go to remove the old policy "testdomain.com". <2>Use this command to create the policy "testdomain.com": New-EmailAddressPolicy -Name 'testdomain.com' -EnabledEmailAddressTemplates 'SMTP:%g%s@testdomain.com' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (UserPrincipalName -like '*testdomain.com'))} -Priority 1 <3> Create one new mailbox to check whether it is work. Thanks, EvanEvan Liu TechNet Community Support
April 13th, 2012 5:44am

Hi Evan, EAP1 was convert from Exchange 2003, it use "All Recipient Types" I try with <2>, and testuser now pick from EAP1 (Testdomain.com EAP), but the mailbox missing X400 & X500 attribute. Thanks
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2012 6:20am

Try the steps Evan posted. There seems to be a (more)generalized EAP above the one you are creating for testdomain.com as I just noticed in your output that it was priority 13. In EAP, they process just like firewall rules, and the same design rules apply where more specific rules need to be at or near the top priority and the more generalized 'catch all' policys need the lower priority.
April 13th, 2012 8:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics