Question
Why can't I receive emails in my cPanel server?
Answer
There are several reasons why you cannot receive mail. Below is a list of reasons with details on how to figure out if that reason is responsible.
Port 25 is not open
One of the most common reasons as to why you're not receiving mail is that 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
Here is an example showing that port 25 is blocked (closed):
# 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
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:
MX records are not pointing to your cPanel server
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.
You can view details on what MX records are here:
You can verify your domain's MX record by running the following command:
# dig mx domain.tld
Note: You will want to replace domain.tld with the domain you want to check.
Warning: You cannot use IP addresses as MX records:
Can an MX record use an IP address?
The Mail routing is not configured to the local mail exchanger
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:
- Log in to cPanel as the user
- Click on Email Routing
- If the cPanel account owns multiple domains, select the needed domain from the dropdown menu
- Verify the mail routing is set correctly
- Log in to the server via SSH as
root, or access the Terminal in WHM -
Run the following command:
# grep domain.tld /etc/{local,remote}domains
Note: You need to replace domain.tld with the domain you want to check.
For more information regarding mail routing, please read the following article:
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"?
Manual MX is set
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. You can view details on Manual MX here:
To verify if a Manual MX has been configured for your domain, you can use the following command:
# grep domain.tld /etc/manualmx
Note: You need to replace domain.tld with the domain you want to check.
or by utilizing Exim routing with the following command:
# exim -bt user@example.com
Note: You will want to replace user@example.com with the email address you want to check.
To remove a Manual MX from a domain, please read the following article:
Comments
0 comments
Article is closed for comments.