Is it possible to forward all incoming emails from Office 365 to external mail server

azure-active-directoryconfigurationemail-serverexchange-2013microsoft-office-365

We have Office 365 account(O365) on the cloud. We have a situation where we won't be able to use O365 or EWS APIs to access some emails. So the best solution at this moment is, if possible, to forward all incoming/outgoing emails to our mail servers instantly. i.e when a user receives email on O365, a copy of that email should be forwarded to our mail servers.

Is it possible to configure such a setting so that when 0365 has incoming emails, the other mail server also receives a copy? Few seconds delay is fine.

I know this can be done per user basis where each user has to configure a forwarding email address but we wanted to do it for the whole AD accounts not for a single user.

FYI: We have to do heavy processing on each incoming emails.

Best Answer

Configuring in bulk (via Powershell with Exchange Online for instance) mailbox level forwarding where it would deliver to both the O365 mailbox and a second mailbox elsewhere could be done...but you would need to stay on top of it for new users.

Something like:

Set-Mailbox  <Identity> -ForwardingsmtpAddress <External Recipient Email Address> -DeliverToMailboxAndForward $False

but with an array and you'd have to know the formatting of external recipient email address and it would need to be standardized (such as bob@local being forwarded to bob@external). Otherwise, the scripting would require a very large input file for both mailbox and external address.

Without doing this, what you are wanting is called "Dual Delivery" and it isn't something that O365 has available built-in even with its own transport rules.

Related Topic