How to Configure Email Routing in cPanel Print

  • email routing, cpanel email, mail exchanger, mx records, email configuration, backup mail server, remote mail, local mail
  • 0

Email routing controls how your server handles incoming mail for your domain. You can configure your server to deliver mail locally, act as a backup mail exchanger, or forward all mail to a remote server. This setting is essential for ensuring your emails reach the right destination without interruption.

The Email Routing interface in cPanel gives you complete control over how mail is processed for each domain on your account. Whether you need to set up a backup mail server or route mail through an external service, understanding these settings will help you maintain reliable email delivery.

Understanding Email Routing Options

When you configure email routing, you have three main options to choose from. Each serves a different purpose depending on your mail server setup:

  • Local Mail Exchanger: The server accepts and delivers all mail to local mailboxes on your account. Choose this option when your domain's mail is hosted on the same server as your website.
  • Backup Mail Exchanger: The server holds mail temporarily until the primary mail server becomes available. This is useful for redundancy and ensuring no mail is lost during primary server downtime.
  • Remote Mail Exchanger: The server does not accept mail for this domain and forwards everything to external mail servers. Use this when you host email with a third-party provider like Google Workspace or Microsoft 365.

How to Configure Email Routing

Follow these steps to set up email routing for your domain:

  1. Log into your cPanel account and navigate to the Email Routing interface under the Email section.
  2. Select the domain you want to configure from the dropdown menu. If you only have one domain, it will be selected automatically.
  3. Choose one of the following routing options based on your needs.

Automatic Detection

The Automatically Detect Configuration option analyzes your domain's MX records and configures routing automatically. The system uses these criteria:

  • If the lowest numbered MX record points to an IP address on this server, it selects Local Mail Exchanger.
  • If the lowest numbered MX record points to an external IP address, it selects Backup Mail Exchanger.
  • If no MX records point to this server, it selects Remote Mail Exchanger.

Note that automatic detection requires properly configured and resolvable MX records. If your MX records do not resolve correctly, you must manually select a routing option.

Local Mail Exchanger Setup

Select this option when your server hosts email accounts and should accept all incoming mail. The server will deliver messages directly to local mailboxes.

This setting is appropriate if you use smart hosts or gateway services to filter mail before delivery. It's also the correct choice if your hosting provider has deleted the domain's DNS zone but you still want to receive mail locally.

Backup Mail Exchanger Setup

Choose this option to configure your server as a secondary mail server. The system will queue incoming mail and hold it until the primary mail exchanger becomes available.

You must configure your domain's primary MX record to point to your main mail server. The MX record for this server should have a higher priority number (lower priority) than your primary server.

Remote Mail Exchanger Setup

Select this option when email is hosted elsewhere and this server should not accept any mail for the domain. All mail will be forwarded to the servers specified in your MX records.

This is the correct setting when using external email providers. You must ensure your MX records point to the correct external mail servers.

Saving Your Changes

After selecting the appropriate routing option, click the Change button to save your configuration. The new settings take effect immediately.

Important Warnings About Email Routing

Incorrect email routing settings can prevent you from receiving mail entirely. If you're unsure which option to choose, contact your hosting provider before making changes.

Always verify your MX records match your routing configuration. A mismatch between MX records and routing settings is the most common cause of email delivery problems.

Frequently Asked Questions

What happens if I choose the wrong email routing setting?

Choosing the wrong setting can cause mail delivery failures. For example, if you select Remote Mail Exchanger but your MX records point to your server, incoming mail will be rejected. You can change the setting at any time to correct the configuration.

How do I know which email routing option to choose?

Choose Local Mail Exchanger if you manage email accounts through cPanel. Select Backup Mail Exchanger if you're setting up redundancy with another mail server. Pick Remote Mail Exchanger if you use an external email service like Google Workspace or Microsoft 365.

Can I use different email routing settings for different domains?

Yes, each domain on your account can have its own email routing configuration. This allows you to host some domains' email locally while using external providers for others.

Why isn't automatic detection working for my domain?

Automatic detection fails when MX records don't resolve properly or aren't configured. You'll need to manually select the appropriate routing option and verify your domain's MX records are set up correctly.

If you need assistance configuring email routing or have questions about your mail server setup, the OBHost support team is available 24/7. Visit our contact page or email support@obhost.org for expert help.


Was this answer helpful?

« Back