O365 SMTP relay

Stefan 0 Reputation points
2025-05-01T09:04:07.85+00:00

Hi Community,

we have AD users synchronization to O365. Everything works fine, users accounts with primary domain are synchronized correctly. For primary domain, lets say mycompany.com (old domain), we are not using O365 exchange server, but we are using our dedicated mail server, so all mailboxes are outside of O365.

After while company decided to rebrand and to start use new domain, lets say newstart.com (new domain). They have also decided that for the new domain users will use mailboxes in O365. So we have added domain newstart.com to same company tenant where we have also mycompany.com domain (synchronized from AD), due to reason that users are already licensed there.

All users in tenant has login accounts to O365 and to their PCs with domain mycompany.com. So far fine.

But now, half of the users (not all) want to start to use mailboxes with domain newstart.com. So what we have done, for half of the users we have configured primary mailboxes with domain newstart.com. But as those users are synchronized for AD with the domain mycompany.com, after changing their primary mailboxes to newstart.com, O365 automaticaly has created also alias to their new mailboxes with old domain mycompany.com. Just to keep in mind, half users which are moved to new O365 email exchange server for new domain, are still using also old mailboxes with old domain on dedicated mail server (so they are using two mailboxes for two different domains located on two different mail servers).

And problem is when someone with new domain mailbox @newstart.com is sending mail to user with old domain mailbox @mycompany.com, but this receiver has also mailbox in new domain @newstart.com, mail will be not send from O365 exchange to external mail server responsible for old domain, but mail will end up in mailbox with @newstart.com domain even if it was destined to @mycompany.com mailbox. I think, this is due to fact, that all users with new mailboxes has also aliases from old domain.

We have also setup in O365 old domain as InternaRelay instead of Autoritative domain, but this does not solve our issue.

So still if you are sending mails from @newstart.com (O365 exchange )to @mycompany.com (external mail server), mails will be received by @newstart.com so O365 exchange will not relay them to external server..

Not sure, if it is explained well and it is understandable, but it is also complex situation during transition company from one domain to other and also migration from external mail server to O365 and also keep some transition mode, so you are not able to transfer everything in one shot.

So can someone get us hint how to fix this please?

THX

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,874 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hien-L 1,910 Reputation points Microsoft External Staff
    2025-05-02T03:02:56.6566667+00:00

    Hi Stefan,

    Thank you for posting your question in the Microsoft Q&A forum.

    May I know do you use on-prem Exchange server with your AD accounts? Or you just use third-party mail server in your current AD forest?

    I would like to know if you mail server and your AD account belongs to the same environment.

    Based on your description, the O365 mailboxes have smtp addresses both with mycompany.com and newstart.com domain. So, it’s normal that, when we send emails from your O365 mailbox to mycompany.com, the O365 mailbox will be resolved in your organization successfully and no need to relay to external.

    If you want to use newstart.com for O365 mailbox and use mycompany.com only for external mail server mailbox, it’s not suggested to add smtp address mycompany.com for these O365 mailbox. At the same time, you could create mail contacts in O365 for external mailboxes with mycompany.com (InternalRelay). So that emails from your O365 mailbox to mycompany.com could be sent out if only mail contact is resolved.

    You can check this article for more details about mail contact:

    Recipients in Exchange Online | Microsoft Learn

    Manage mail contacts in Exchange Online | Microsoft Learn


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.