Hybrid Setup: M365 to Hostinger

Setting up Hybrid Mail Flow Between Microsoft 365 and Hostinger

In many organizations, migrating fully to Microsoft 365 (M365) may not be immediate. Some users’ mailboxes may still be hosted on Hostinger, while others are already migrated to Microsoft 365 Exchange Online. In this scenario, we can configure a hybrid mail flow, ensuring that:

  • Emails first route to Microsoft 365.

  • If the recipient mailbox is not available in M365, the email is forwarded to Hostinger.

This guide explains how to set up mail flow between Microsoft 365 and Hostinger.

Prerequisites

  • Custom Domain Registered

    • You should already have your domain (e.g., example.com) connected to both Microsoft 365 and Hostinger.

  • Access to Hostinger Email Settings

    • Ability to configure DNS records and view Hostinger’s mail server details (SMTP, IMAP, MX, etc.).

  • Microsoft 365 Admin Access

    • You need to be a Global Admin or Exchange Admin to configure connectors and mail flow.

Configure DNS MX Record

To make Microsoft 365 the primary email handler:

  1. Go to your DNS management (Cloudflare, Hostinger DNS, or wherever your domain is hosted).

  2. Set the MX record to point to Microsoft 365:

    Priority: 0  
    MX: <your-domain>.mail.protection.outlook.com

    Example:

    MX: example-com.mail.protection.outlook.com
  3. Remove or lower the priority of Hostinger’s MX record.

Differences To Know

  • Partner organization connector → Usually used for external companies. It only routes mail to specific domains or specific recipient addresses you configure. Since you’re adding Hostinger mailboxes manually, Exchange Online will only relay messages for those exact accounts you entered.

  • Your organization’s email server connector + Internal Relay domain → Smarter, because you don’t have to manually maintain a list of users. Exchange Online first checks if the recipient exists in M365. If not, it automatically forwards to Hostinger for delivery.

Why Partner Organization might cause issues:

  • You’ll need to keep updating the connector manually whenever a Hostinger mailbox changes.

  • If you miss an account, Exchange Online will bounce mail instead of delivering to Hostinger.

  1. Set your domain in M365 as Internal Relay.

  2. Create a connector from Office 365 → Your organization’s email server pointing to Hostinger SMTP.

    • That way, any non-M365 mailbox gets routed to Hostinger automatically.

Set Up a Connector in Microsoft 365

We’ll configure Exchange Online to route non-M365 mailboxes to Hostinger.

  1. Log in to the Microsoft 365 Exchange Admin Center (EAC) → https://admin.exchange.microsoft.com

  2. Go to Mail Flow → Connectors.

  3. Click + Add a connector.

    • From: Office 365

    • To: Your organization’s email server → (this will be Hostinger)

    • Click Next.

  4. Name the connector:

    • Example: M365 to Hostinger Fallback

  5. Configure the connector to route to Hostinger’s SMTP servers:

    • Hostinger typically uses:

      smtp.hostinger.com (TLS, port 587)
    • Or your custom Hostinger mail server for the domain (check in Hostinger panel).

  6. Set TLS encryption required.

  7. Validate the connector with a test mail flow.

Configure Accepted Domains in Microsoft 365

Now, we need to tell M365 that not all mailboxes exist in Exchange Online.

  1. In Exchange Admin Center, go to Mail Flow → Accepted Domains.

  2. Select your domain (e.g., example.com).

  3. Change the domain type from AuthoritativeInternal Relay.

  • Authoritative: M365 assumes all mailboxes for example.com exist in Exchange Online. If the mailbox is missing, the mail is bounced.

  • Internal Relay: M365 first checks its own mailboxes; if the user does not exist, it routes the mail to another server (Hostinger, in this case).

Test the Mail Flow

  • Send an email to a mailbox hosted on M365 → It should deliver to the M365 inbox.

  • Send an email to a mailbox that only exists in Hostinger → M365 will forward it to Hostinger via the connector.

  • Check message trace in M365 Admin Center for debugging if needed.

Summary

  • MX Record → Points to M365.

  • Accepted Domain → Set as Internal Relay.

  • Connector → Configured from M365 → Hostinger.

This setup ensures:

  • If the mailbox exists in M365 → Delivered there.

  • If the mailbox does not exist in M365 → Routed to Hostinger.


REFERENCES

Last updated

Was this helpful?