Introduction
There are several reasons why you cannot receive mail. In this guide, we will be going through the most common issues.
Procedure
1. Port 25 is not open:
# nmap 10.10.10.10 -p 25
Starting Nmap 6.40 ( http://nmap.org ) at 2021-06-09 04:00 CDT
Nmap scan report for example.com (10.10.10.10)
Host is up (0.040s latency).
PORT STATE SERVICE
25/tcp closed smtp
Nmap done: 1 IP address (1 host up) scanned in 0.65 seconds
One of the most common reasons as to why you're not receiving mail is because port 25 for incoming connections is either closed or filtered. You can use NMAP to troubleshoot your port connections: How to use nmap to troubleshoot port connectivity issues.
Despite the fact that cPanel offers the option to change the port Exim listens on, you cannot use alternate ports to send or receive mail as port 25 is the stand port for SMTP. Other remote servers are not configured in a way to accept mail on non-standard ports. This is why port 25 is required to be functional for mail to work correctly. For more information, please read the following article: Why is port 25 blocked?
2. MX records are not pointing to your cPanel server:
[root@ ~]# dig mail.example.com +short
10.10.10.1
[root@ ~]#
The MX records specify the mail server responsible for accepting email messages on behalf of a domain name. Therefore it is important to have MX records. If they are nonexistent, the sending server will not know where to send the mail.
Please note that you cannot use IP addresses as MX records: Can an MX record use an IP address?
3. The Mail routing is not configured to local mail exchanger:
[root@ ~]# grep example.com /etc/{local,remote}domains
/etc/remotedomains:example.com
/etc/localdomains:subdomain.example.com
[root@ ~]#
When the Mail routing is configured to be remote, your cPanel server will not accept emails for the domain. You can verify if your Mail routing is configured to a local or remote mail exchanger within the interface or command line.
Interface: Go to cPanel > Mail routing and select the domain from the dropdown menu.
Command-line: Run the following and replace domain.tld
with your domain:
grep domain.tld /etc/{local,remote}domains
For more information regarding Mail routing, please read the following article: https://docs.cpanel.net/cpanel/email/email-routing/
If you wish to understand the differences between a local and remote mail exchanger, please read the following article: What is The Difference Between Remote Vs. Local Mail Exchange Within "Email Routing"?
4. Manual MX is set:
[root@ ~]# exim -bt user@example.com
user@example.com
router = manualmx, transport = remote_smtp
host external-mail.com [10.10.10.2]
[root@ ~]#
A Manual MX is an MX redirection that lets you bypass the domain's MX lookup via the Domain Name System (DNS). It lets you create a manual Exim mail exchanger (MX) redirect for a domain. To verify if a Manual MX has been configured for your domain, you can use the command as shown above and replacing domain.tld
with your domain:
grep domain.tld /etc/manualmx
or by utilizing Exim routing, and replacing user@example.com with a valid email account in your domain:
exim -bt user@example.com
To remove a Manual MX from a domain, please read the following article: How do I add or remove a domain from /etc/manualmx?
Comments
0 comments
Article is closed for comments.