After setting up custom domain email address in cPanel and successfully sending and receiving emails through that email address for years, recently I found my email ended up in my Gmail account's spam folder.
The rejected email contained a notification from one of my websites that I set to be sent from my custom domain email to my Gmail address. It worked before, but one day I got this email notified me about a mail delivery failure with the email subject "Mail delivery failed: returning message to sender" and the content:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
EXAMPLE@gmail.com
host gmail-smtp-in.l.google.com [IP ADDRESS]
SMTP error from remote mail server after end of data:
550-5.7.26 This mail is unauthenticated, which poses a security risk to the
550-5.7.26 sender and Gmail users, and has been blocked. The sender must
550-5.7.26 authenticate with at least one of SPF or DKIM. For this message,
550-5.7.26 DKIM checks did not pass and SPF check for [DOMAIN NAME] did not
550-5.7.26 pass with ip: [IP ADDRESS]. The sender should visit
550-5.7.26 https://support.google.com/mail/answer/81126#authentication for
550 5.7.26 instructions on setting up authentication. CODE - gsmtp
I didn't change any settings, so there must be other reason for that sudden mail delivery failure with error code 550-5.7.26.
The Cause of Mail Delivery Failed 550 5.7.26 Error
The SMTP error code 550 5.7.26 indicates a problem with the domain's email authentication or verification method(s), especially the SPF or DKIM.
Starting November 2022, Google requires senders who send email to personal Gmail accounts to set up either SPF or DKIM records at their domain to authenticate their emails. Google performs random check to verify the email's authentication, so if you haven't set SPF or DKIM records but still able to send email from your custom domain email to Gmail, maybe it's not your turn yet to be checked by Google 🙂 .
It's best to set SPF or DKIM or even both to prevent problems in the future as Google said that messages without at least one of those authentication methods will be rejected with a 5.7.26 error, or marked as spam.
How to Solve Mail Delivery Failed 550 5.7.26 Error in cPanel
The Mail Delivery Failed 550 5.7.26 SMTP error can be solved by setting up SPF and/or DKIM records at your domain. If you create your custom domain email from cPanel, follow these steps to configure SPF and DKIM records in cPanel:
- Go to the Email Deliverability tool. It can be found in the Email section or you can type it in the Search Tools box.
- Check which domain has the problem by looking at the status in Email Deliverability Status column, e.g "Problems Exist (SPF)", Problems Exist (DKIM)", or "Problems Exist
(DKIM and SPF)". - Configure the missing record(s).
There are two ways to configure it: automatically or manually.
If you want to let the system to configure the record(s) automatically, click the Repair button. It will take care of everything. It is recommended to go this way if you are not sure what to do.
If you prefer to set the DNS records manually, click the Manage button. Note the type, name, and value of the DNS record(s) that you have to create in the Zone Editor tool. Do this only if you know what you are doing. - Make sure the status in Email Deliverability Status column has changed to "Valid".
Now you should be able to send emails from your custom domain email to Gmail accounts without problem anymore.