Symptoms
After pointing a domain's MX record to your cPanel & WHM server and sending an email to an existing account on the server, you might recieve a bounceback email with an error like this:
550 Please turn on SMTP Authentication in your mail client, or login to the IMAP/POP3
server before sending your message. mail.server.tld [198.51.100.0]:44583 is
not permitted to relay through this server without authentication.
If you check the Exim log (Where are the Exim logs?), you may see an error like the following one:
H=mail.remoteserver.tld [198.51.100.0]:44583 ... F=<sender@domain.tld> rejected RCPT
<recipient@localdomain.tld>: Rejected relay attempt: '198.51.100.0' From:
sender@domain.tld' To: 'recipient@localdomain.tld'
Description
This is often caused by an incorrectly set mail routing for the domain. If the MX record for the domain points to the server, but the server sees that mail for the domain is supposed to be remote, it will attempt to relay the email and fail.
To confirm this, check for the domain in /etc/localdomains and /etc/remotedomains and make sure that if the server is supposed to handle mail for the domain, it should be in local. If mail is on a different server, it should be remote.
egrep ^domain.tld /etc/{remote,local}domains
Workaround
Navigate to cPanel > Email > Email Routing and click "Change" after confirming " Local Mail Exchanger " is selected.
See more:
What is The Difference Between Remote Vs. Local Mail Exchange Within "Email Routing"?
Other causes
This can also be caused if you're intentionally attempting to relay mail through the server without whitelisting the remote server's IP address in Exim. We do not recommend or support using a cPanel & WHM server as an open relay.
Comments
0 comments
Article is closed for comments.