I have recently had an Office 365 and Exchange 2007 Mail Flow Issue for Sub Domain. We have our primary users on [email protected] and have setup Office 365 to process mail for [email protected] .
The setup for Office 365 went extremely smoothly (with a lot of help from a friend – you know who you are J.P.) and I have integrated Office 365 with our on-premise Active Directory using ADFS and Synchronization Service Manager for Single Sign On.
However when a user, [email protected] tried to send an email to [email protected] using the on-premise Exchange 2007 the mail was not delivered.
User [email protected] could send email to [email protected] without any problems, but again a reply from [email protected] was not delivered.
I investigated further on the Exchange 2007 Server and found that in Queue viewer there was an Unreachable Domain queue with emails which could not be delivered.
The error message displayed was “The mailbox recipient does not have a mailbox database”.
I tried a few things to try to rectify this;
I added an additional Accepted Domain for sub.domain.com – this did not work.
I added an additional send connector for sub.domain.com – this did not work.
I checked in Active Directory Users and Computers that the Email field was set to [email protected] – it was set and this did not work.
I used ADSI Edit to check the proxyAddresses attribute included SMTP:[email protected] – the upper case SMTP indicates this is the primary email address – this did not work.
I then stumbled upon the following blog post;
http://blogs.technet.com/b/exchange/archive/2005/01/10/350132.aspx
This stated
” targetAddress – In contacts and mail-enabled users this attribute contains the type and address of the mailbox represented by the recipient. This will point to a mailbox outside the Exchange organization, for example, to a hotmail account or to another’s company address. On the ‘Users and Computers’ snap-in, this property is edited on the ‘Exchange General’ page of contacts and mail-enabled users.”
I checked out the targetAddress attribute using ADSI Edit and added the [email protected] and this worked.
What is basically happening is that the Exchange 2007 Server sees the targetAddress attribute is populated with a non Accepted Domain and therefore treats it as an external address and simply passes it out through the relevant Send Connector.
Once this was configured mail flow worked in both directions