We use emails in our daily life and our day is not complete without a mailbox. However, sometimes when you try to send an email to someone, you come across an error. Well, in this post, we are going to be discussing the type of email error which is faced by server owners, owners of websites, and web hosts. This error is 554 5.7.1, let’s see how it looks when you see it on your screen:
554 5.7.1 <email@example.com>: Relay access denied
554 5.7.1 : Relay access denied error simply means that the sender failed for improper configuration of the recipient’s mail server or safety checks.
So what are the reasons behind this error? What is the solution for the same and other related things? Let’s uncover everything about it.
Reasons behind Relay Access denied error
If you look into it, you will picture two servers getting involved in this procedure, one is Sender’s MX and the other one is Recipient’s MX. If either of these servers rejects the mail, it results in relay access denied error. Now two cases create this error. Let’s get to know about them.
1- Mail is rejected by Sender’s MX
As you might notice, when you log in to any of your mail accounts, you need to type in your username and a correct password to log in and send emails. This credential helps to keep your account safe from spammers. But there are times when a user with valid mail details fails to switch on the 2-step authentication. And this situation results in MX rejecting their mail.
So, this error is majorly caused by wrong SMTP settings. Once you have double-checked these settings, you will be able to send emails and will not come across any error messages in future.
2- Mail is rejected by Recipient’s MX
You might know that the recipient’s mail server is not going to accept the mail if it can’t verify the recipient’s credentials through the servers.
You may take the example as – if the account’s recipient account is canceled or being inactive, then the mail isn’t going to be accepted.
So, here are the main reasons for the error:
- Incorrect configuration of sender MX which has SMTP authentication settings disabled.
- Inactive or canceled receiver email address.
- The other reason for the ‘javax mail send failed exception invalid addresses relay access denied’ error can be that the receiver’s DNS MX stats point toward the incorrect server which generally occurs after migration.
- Errors in the user’s database.
Now there are two variants of the error:
- 554 5.7.1 Relay Access Denied
With this one variant, the logs of the recipient’s mail server get to see this error in case if a sent email is rejected.
- 454 4.7.1 Relay Access Denied
The other variant shows this error by the time the receiver’s server does not accept the emails temporarily. Hence, the mail delivery to the recipient server will be tried again later.
Now let’s move forward to know about the solution for the same
How server owners fix this “Relay Access Denied”?
There are two major reasons a server owner face this issue:
- When the user attempts to share an email, it bounces back.
- When a person is trying to send an email to a user on your server and facing this error and in turn, they have reported it to you.
So, the error is going to be like as shown here:
Jan 23 03:10:57 mysev postfix/smtpd: NOQUEUE: reject: RCPT from mail-wg0-f53.google.com[188.8.131.52]: 554 5.7.1 <firstname.lastname@example.org>: Relay access denied; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<mail-wg0-f53.google.com>
To resolve the issue in the above 2 cases, make sure that you confirm the mail id of the receiver in advance whether it exists or is in use or not. After confirming, try sending the email again. Even after doing so, if you come across this issue again, check out for other reasons of the error and their solutions mentioned here.
The other reasons for the error and solutions:
- Broken authentication system of the user
If all of your end users are getting this type of error then this is the most common cause. Now what you need to do is just check the server’s authentication configuration.
Let’s take an example- where you are running a postfix error then you must make sure the SMTP authentication is enabled. For this purpose, you would need to cross-check configuration file for the restrictions shown below:
“smtpd_recipient_restrictions” is set as
smtpd_recipient_restrictions = permit_sasl_authenticated
Occasionally when the server software gets updated it would tweak the configuration. So, if you see your server running smoothly but suddenly it gets stopped then it might have gone through the Software or OS upgrades.
- Corrupted Authentication Data
There are some servers that store the username, password, and authentication IP addresses in their database, like the Plesk servers. Plesk servers usually store this entire data in smtp_poplocks MySQL database. This database gets damaged sometimes due to disk errors, file system errors etc. A faster integrity check of the database will get rid of this issue.
- Misconfigured or Inactive receiver’s email account
Mail server accepts only the emails that are addressed to its own users. There are 2 cases when the recipient server can’t confirm the user as valid i.e., corrupt database and wrong IP set by the recipient. As this issue cannot be fixed at the sender’s mail server end, for a quick resolution we need to contact the MX administrator.
- Anti firewall check of the server failed due to external sending
In cPanel management, we will come across a thing where email server users will not be able to receive emails from external sources which result in “Relay access denied” error. This actually occurs when the anti-firewall check of the server fails due to the external mail server.
There are 3 solutions to resolve this error. Examining the email logs i.e., checking valid email instances that are being blocked and updating anti-spam rules.
Ii If the error occurs due to any particular external source mail server, contact the administrator of that external source and make their servers agree to anti-firewall checks.
Iii. If the mail server is trustworthy and valid, we can bypass the server check by including it in the white list.
Anti-firewall checks are mandatory but if not done genuinely, they may cause business damages. So, make sure you keep yourself RFC spam checks compliant and execute only those mail servers that are checked and validated by maximum service providers.
- Wrong email configuration of the mail user
This is one of the most frequent causes of the error. In this case, we need to perform a mail log check and make sure that there aren’t any more bounced emails, clogged email queues in that mail server and then fix it by checking the client configuration of the email user.
How can mail users fix this “Relay Access Denied” error?
Here we have listed out some of the situations when mail users come across this error
- Changed authentications settings of the Server
If you have made some recent changes to your email service provider or migrated it to an updated server, then you can expect that the settings of the server have been changed.
Let’s take an example where you might be going to SMTP after using POP, now the new users use SMTP authentication. This is when we need to confirm some credentials of the email users to check the SMTP authentication such as:
Mail server name – Eg: [mail.yourserver.com](http://mail.yourserver.com)
Mail server IP – Eg: 184.108.40.206
Enabled or disabled SMTP authentication?
- Authenticated IP change on mobile phones
With the server which is configured with the SMTP after POP then the domain owner using mobiles seems to show irregular relay errors.
Now, this situation arises when they switch the Wi-Fi hotspot or [4G or 3G or 2G] network IP changes because of the breakage into the coverage.
However, the server that is being referred to the old IP address and the domain owner’s mobile would be running now on the IP address that is new.
So we fix this issue with Password authentication SMTP. For eg: within parallel Plesk servers, it is recommended to disable SMTP authentication and POP3 Authorization which are By default turned ON.
- Domain owner trying to connect with inappropriate server
Now, this situation arises especially with the domain users who registered with a new account. In this case, make sure to use the mail server ISPs or continue using the old hosting server’s IP or hostname.
Now, when the changes are done for the domain’s owner device, they can be resolved soon.
Therefore, it is advised that mail clients maintain and follow step-wise settings while configuring emails in all their devices and operating systems without fail.
- Server’s spam-check failed by external parties
Now at times, when users are not able to receive emails coming from the external party. In such a case, you can expect that the server action fails while performing an anti-malware check. This is the reason we need to ensure to check all the server login log details and fix it by getting in touch with the remote admin’s mail server
- Broken mail server
Another reason for the error is the broken mail server’s authentication system. Now this mail will be moved into the spam folder of the email.
We know that emails are a crucial part of our daily life. Many things can’t wait but with these solutions, your mail errors can vanish.
E-mail is used for professional communication which has many benefits as it holds up important data. If it is deleted from your computer you can again download and access it on your computer. So, hoping that these solutions regarding the relay access denied and other mail issues that the main server and domain owners face, will work in your favor. Do let us know your experience through comments.