Tuesday, March 13, 2012

Exchange 2010 Loop

I just resolved an issue with Exchange 2010 where I was getting loop detected.
Our setup is Exchange 2003 in old domain, Exchange 2010 in new domain with SMTP namespace sharing. http://blog.mimecast.com/2011/06/guest-post-migrating-between-email-servers-smtp-namespace-sharing/

Mail flow was working fine with some users but other users couldn't receive mail at all.

Message tracking logs showed there was a loop
C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\MessageTracking
ExchangeServer,,,LoopDetected,,SMTP,DEFER,0,,testuser@contoso.com

The Queue Viewer showed that a local loop was detected


I found that the targetAddress attribute was set in Active Directory


The value of the targetAddress attribute is the address of the user that is outside of the local Exchange  organization that mail should be sent to. When mail is sent to the mail-enabled user or contact, the mail is redirected to the address held in the targetAddress field.

Editing the targetAddress field and selecting Clear sets it to <not set>

After that I was able to send and recieve mail from that account.

BTW the targetAddress attribute can be cleared using Quest Active Server Roles powershell (run on the Domain Controller) here's what I used....

get-qaduser -LDAPFilter "(&(&(&(objectCategory=Person)(objectClass=User)(targetAddress=*)(homeMDB=*))))" | Set-QADUser -ObjectAttributes @{targetAddress=$null}

Let me break it down
get-qaduser get ADuser
-LDAPFilter Filter using an LDAP query
objectCategory=Person Person CategoryobjectClass=User Is a user
targetAddress=* Has the Target Address Set
homeMDB=* Has the homeMDB attribute set - We were doing Exchange 2003 migration in Exchange 2003 this attribute isn't set.
| Pipes users that meet above into our command to change the attribute
Set-QADUser Sets AD Attributes
-ObjectAttributes @{targetAddress=$null} Sets the targetAddress attribute to nothing ($null) in AD this will appear as <not set>

No comments:

Post a Comment