MS365, Teams, and not using MS for email. Invite emails inside the org are missing

Posted by Kurgan_IT@reddit | sysadmin | View on Reddit | 18 comments

I'm a Linux admin, but I'm currently trying to find a solution to a MS365 issue.

I have a MS365 tenant that we use just for Teams. Our email is hosted in-house on our own Linux email server. We have set up our 365 config so that the email addresses that are used in Teams are the ones in our own domain (not onmicrosoft.com).

When someone creates a Teams invitation, emails to external domains are fine. They get delivered (they are generated and delivered by MS, not by us, and this causes an issue with SPF, but this is a different issue).

But emails that should be delivered inside our own domain (emails that are sent to coworkers instead of external people) simply get lost. No errors, no nothing. If they are actually created, they don't get to our server (which is the MX for our domain) and don't appear anywhere.

So I googled and found that you should probably make a filter on 365 to explicitly deliver these to our mail server. The idea is this: In O365, Exchange Admin Center, Mail Flow, Create an Outbound Connector pointing to local mx, Then Create a Transport Rule for all messages Where the Recipient is your SMTP Domain, Forward the message to the Outbound Connector.

I did it. It still does not work. I am lost. Any ideas?