First I will cut to the chase and ask my question:
How do I route internal mail back to my on-site server for delivery?
Now I will explain my situation:
My organisation currently uses Google Apps for the domain. There are between 5-10 users.
A friend (let's call him Bill) needed some work so I decided to give him a small project consolidating spreadsheet data. Bill doesn't have Office Desktop and is on a Mac, so I decided to set him up with Office365, with the intention of also trialing the Office365 service with a view to potentially migrating the organisation over in future.
The first - and by far the highest - hurdle was setting his Outlook up. In an ideal world, I would have simply set him up an IMAP account on our existing server, and have Outlook Web App connect via IMAP to retrieve his mail. Notwithstanding the potential confusion of him having two addresses, my first endeavour was to try to set this up using the "connected accounts", connecting it to his default .onmicrosoft.com inbox. Documentation is thin on the ground but finally I was able to determine that whilst IMAP is supported, IMAP from gmail is specifically not supported. POP was a viable option for this task however the frequency with which Exchange checks the external POP server is limited to an hour minimum - this is mind bogglingly unhelpful and I can't perceive many situations where receiving your emails with up to an hour's delay would be beneficial.
Far from put off by this, I investigated ways of delivering Bill's mail directly to the Exchange server. This of course would require deleting his gmail account and setting him up an account on Exchange using our domain, which I did after verifying the domain (a straightforward process).
It's impossible to get mail delivered to two separate MX servers without using an intermediary relay to receive the mail and send it on. However, it was possible to use Google Apps for this purpose, keeping everything in the cloud and avoiding a change to MX with the corresponding disruption to the organisation's mail delivery.
I set Google Apps up to relay mail to Exchange, only if addressed bill@ourdomain.com.
It works amazingly - all mail is delivered as usual, and Bill's mail is delivered to his Outlook Web App.
External outbound mail, that is anything he sends that is not addressed to our domain, is also sent correctly.
Problems have arisen however, getting outbound internal mail - that is, any mail sent to users at our domain - to work. My interpretation of the email bounces was that when Bill sends mail, it is sent via the Exchange server. Because the Exchange server was performing a lookup using its own address list, and the rest of the organisation doesn't use Exchange, it was returning a "mailbox not found"-type error.
Setting the domain as shared in the Microsoft Online settings stopped the errors, but still didn't result in internal mail being delivered.
The solution of course is very simple - either, Exchange can be told the SMTP server details of our Gmail SMTP server, along with credentials (I appreciate this probably means setting up a Google Apps account for Bill in order to pass SMTP verification but it's so cheap we're not that fussed), or - and this would be my preferred option - Exchange is told not to use its usual process to deliver internal mail, and simply treats it as external mail, delivering it to the MX server listed for our domain.
As I say I've found documentation fairly hard to come by, particularly at this level. There is plenty of documentation available for Exchange Server but not a lot for the "cloud", hosted incarnation of it.
The workaround I have employed is to set myself up with an Exchange account. That way, Bill can at least send emails to me at my work email address, which suits the purposes of his task. However I'm left checking two inboxes as his email gets delivered to my Outlook Web App inbox, with all my other mail being processed by Gmail as usual. It's clearly not a long-term solution and as I'm trialing Office365 I did want to move my email across to test it, and potentially my business partner's. We require 100% uptime and reliability during office hours so not being able to email internally would cause so much hassle it wouldn't be worth it.
Microsoft make a lot of noise in their literature about designing Office365 to work with hybrid setups. It's an honourable intention that marks a departure from their previous culture of making everything proprietary and difficult to interface with non-MS products. However, almost the first page of the manual states that using Office365 requires moving the domain nameservers over to Microsoft! I can't see how this would work for all but the smallest of companies, and it still creates downtime and the need for IT support during migration, plus I understand that the MS DNS controls only allow for editing of A and CNAME records - given the raft of services requiring domain authentication via TXT records these days, this limits one's options significantly. Even if we did decide to migrate email over to Exchange Online, no way would we be pointing our nameservers over. It shouldn't be, and isn't, necessary.
That said, the documentation does say that if one doesn't wish to point their nameservers to Microsoft, they have the option (although this is not the MS-preferred option) to point their MX servers to Exchange.
I did find a section of the documentation that outlines a solution for retaining existing MX servers in a hybrid setup. However it seems to only be relevant for hybrid setups where the previous email server was an on-site Exchange server. IMAP migration seems to be documented as an all or nothing process, when it doesn't need to be that way. The documentation regarding hybrid setup with onsite Exchange mentioned routing outbound email from Exchange Online back to the onsite server using FOPE connectors. My knowledge of Exchange/Forefront being non-existent, I thought that might be worth a try. However, having set that up, Bill's email still is not delivered to our existing email server.
I've just gone in to have a look at exactly what settings I put into Forefront, but now when I click "Configure IP safelisting, perimeter message tracing and email policies" from Outlook Web App Settings, Forefront is throwing the following error:
We are sorry but your session has expired.
You need to close this browser window and open a new one to log in again.
The browser window is fresh one, opened by a pop-up from OWA. Anyway, appreciative that this is probably a temporary glitch, this is not why I'm here. I am struggling to believe that hybrid setups only work with existing Exchange setups onsite. Either:
- It is possible to instruct Exchange Online to relay/copy mail to an external server
- It is possible to inform Exchange Online that it isn't the authoritative mail server, and that internal mail should be treated as external mail and delivered to the domain's listed MX server
- There is another method of achieving internal mail delivery
- Office365 does not in fact offer hybrid functionality for those coming from a non-Exchange solution
At the very least, I'd like to know if what I'm trying to achieve is possible. I'm not interested whether it is supported by Microsoft/Office365 as many Microsoft-unsupported things are entirely possible. I'd also like to highlight that the amount of potential Office365 customers currently using Google Apps is likely to be relatively high, and of those, many would want to trial the service without disrupting existing email accounts, like I am trying to do.