Mail Routing Configuration Guide

6 min read Updated on December 1, 2024 Cloudiway Team

Overview

The Cloudiway mail routing platform facilitates email redirection during domain migrations, particularly between Office 365 tenants. This is essential when you need to redirect email from a source domain to a target domain during a migration window.

Common Use Cases

  • Office 365 tenant-to-tenant migrations
  • Domain transitions during company mergers
  • Temporary mail forwarding during phased migrations
  • Coexistence scenarios requiring mail routing

Configuration Steps

The mail routing configuration involves six primary steps. Follow this guide carefully to ensure proper email delivery during your migration.

Step 1: Domain Mapping

The Relay section enables inbound mail routing for short-term scenarios like tenant transitions.

  1. Log in to the Cloudiway Portal
  2. Navigate to Mail Routing → Relay
  3. Click Add Domain in the Domains Mapping List
  4. Enter your source domain (e.g., source-company.com)
  5. Enter your target domain (e.g., target-company.com)
  6. Click Save
# Domain Mapping Example
Source: *@warmsushi.com → Target: *@drypizza.com

Step 2: User Mapping

The system implements a two-tier routing approach for maximum flexibility:

Priority 1: User-Specific Mapping

First, the system checks if the specific email alias has a custom mapping. If found, mail routes to the designated recipient.

Priority 2: Domain-Level Rules

If no user-specific mapping exists, the system applies domain-level rules (e.g., *@original.domain → *@new.domain).

Example Routing Logic

bob@warmsushi.com bob.owen@drypizza.com (user mapping)
alice@warmsushi.com alice@drypizza.com (domain rule)

User Mapping vs Domain Mapping

Use user-specific mappings when email addresses change during migration (e.g., firstname@domain to firstname.lastname@domain). Domain rules handle straightforward domain swaps.

Step 3: Push Data

After configuring your mappings, you must push the data to activate the changes across the mail routing system.

  1. Review all domain and user mappings for accuracy
  2. Click Push Data in the Mail Routing section
  3. Wait for confirmation that the configuration has been applied

Important

Changes are not active until you push the data. Always push after making any mapping modifications.

Step 4: Whitelist Cloudiway IP Addresses

To prevent routed emails from being blocked, you must whitelist Cloudiway's IP addresses in Microsoft Defender's anti-spam policies.

  1. Sign in to the Microsoft 365 Defender portal
  2. Navigate to Email & collaboration → Policies & rules → Threat policies
  3. Click Anti-spam policies
  4. Select the Connection filter policy
  5. Add Cloudiway's regional IP addresses to the IP Allow list
  6. Click Save

Regional IP Addresses

Contact Cloudiway support to get the current IP addresses for your region. IPs vary based on your datacenter location:

  • Europe (EU)
  • United States (US)
  • Asia Pacific (APAC)

Step 5: Testing

Before updating MX records, thoroughly test your mail routing configuration:

  1. Send test emails to both user-specific and domain-level mapped addresses
  2. Verify emails arrive at the correct target mailboxes
  3. Check that email headers show proper routing through Cloudiway
  4. Test with external senders if possible
  5. Document any issues and resolve before proceeding

Testing Without MX Changes

You can test mail routing by temporarily modifying your hosts file or using direct SMTP relay testing before making public MX record changes.

Step 6: Update MX Records

Once testing confirms proper configuration, update your domain's MX records to point to Cloudiway's mail routing servers.

  1. Access your DNS provider's management console
  2. Locate the MX records for your source domain
  3. Update the MX record to point to Cloudiway's mail routing IP address
  4. Set appropriate priority (typically 10)
  5. Save changes and allow for DNS propagation (up to 48 hours)

Important Note

Cloudiway does not manage MX record configuration. You are responsible for updating MX records with your DNS provider. If you're unsure how to do this, consult with your IT team or DNS provider.

# Example MX Record
source-company.com. IN MX 10 mail-routing.cloudiway.com.

Configuration Complete

Once DNS propagates, all emails to your source domain will route through Cloudiway and deliver to the appropriate target mailboxes based on your mapping configuration.

Was this article helpful?

Need more help? Contact our support team

We value your feedback

Help us improve your experience

What would you like to share with us?

Need direct support? Open a ticket