If you've recently created an MX record for your SMTP server in cPanel and are unable to receive emails, there may be several underlying causes. This guide will walk you through troubleshooting steps, including verifying your domain registrar's name servers and avoiding common issues with Cloudflare and DNS configurations.

It's important to note that DNS changes, including MX records, can take up to 72 hours to propagate. If it's been less than 3 days since the changes were made, allow more time before troubleshooting further.

Basic Troubleshooting Steps for MX Record Issues

  1. Verify Name Servers: Make sure your domain's name servers are correctly pointed to your cPanel Zone Editor.
  2. Cloudflare Setup: Ensure that mail-related DNS records are not proxied through Cloudflare.
  3. Check Record Propagation: Use tools like MX Toolbox to check the status of MX records and diagnose any issues.

Cloudflare Best Practices for MX Records

  • Ensure mail-related DNS records are “grey-clouded” in Cloudflare to avoid mail traffic being proxied.
  • Separate IP addresses for HTTP/HTTPS traffic and mail traffic. Use non-contiguous IPs for better security.
  • Do not configure MX records for a root domain proxied through Cloudflare. Instead, use a subdomain like “mail.example.com”.

Common MX Record Errors and Solutions

  • Ensure the MX record name is not prepended with ‘@' or any other character in cPanel. Leave the record set name blank if you're setting up an MX record for a root domain.
  • Review your cPanel Zone Editor to confirm that the mail exchanger (MX) record is correctly set up for your SMTP server.

Advanced Troubleshooting via Command Line (CLI)

For those who prefer working with the CLI, you can troubleshoot and diagnose MX record issues using common Linux command-line tools.

Step 1: Verify Your MX Records

Use the dig command to check the MX records for your domain:

Step 1: Verify MX Records

dig MX yourdomain.com

This command will display the current MX records for the specified domain. Check for correctness, including the mail server's domain and priority.

Step 2: Check DNS Propagation

To verify if DNS changes have propagated, use the nslookup command:

nslookup -type=mx yourdomain.com

This will query the authoritative DNS server for your domain and show the current MX records.

Step 3: Test Email Server Connectivity

To test connectivity to your mail server, use the telnet command:

telnet mail.yourdomain.com 25

This tests if your mail server is reachable on port 25 (the standard SMTP port).

Step 4: Check Reverse DNS Records

To ensure that reverse DNS records are set up correctly, use the following command:

dig -x [IP_ADDRESS]

Replace [IP_ADDRESS] with the IP address of your mail server. This checks if reverse DNS is configured, which is essential for email delivery.

Step 5: Check for Blacklist Status

To see if your domain or mail server is blacklisted, use the following command:

dig +short yourdomain.com @blacklist.example.com

You can replace @blacklist.example.com with a known blacklist DNS server or use online tools like MX Toolbox Blacklist Lookup.

Step 6: Test Email Flow

To test the flow of emails, you can use swaks (Swiss Army Knife SMTP) for sending test emails:

swaks --to youremail@domain.com --from test@domain.com --server mail.domain.com

This command will help you test if your mail server can send and receive emails successfully.

If you've followed the steps above and are still experiencing issues with receiving emails, contact our technical support team for further investigation. Additionally, tools like MX Toolbox can help diagnose more complex MX record issues and check your domain's blacklist status.

CLI Steps Summary

  • Verify MX Records using dig MX yourdomain.com.
  • Check DNS Propagation using nslookup -type=mx yourdomain.com.
  • Test Mail Server Connectivity using telnet mail.yourdomain.com 25.
  • Verify Reverse DNS Records with dig -x [IP_ADDRESS].
  • Check for Blacklisting using dig +short yourdomain.com @blacklist.example.com.
  • Test Email Flow using swaks.

This troubleshooting guide helps both through the cPanel interface and CLI, providing comprehensive steps to resolve MX record issues efficiently.

Did this answer help? 0 People found this helpful (0 Votes)