Resource icon

Fixing the 454 4.7.1 Relay Access Denied Error in Postfix

Postfix is a common mail server used by many web hosts, server owners, and users. Many of them report coming across the Relay access denied error, which looks like this:

454 4.7.1 <user@domain.com>: Relay access denied

The 454 error usually surfaces when sending to or receiving from outside domains. In this article, learn how to fix this error in Postfix.

Why 454 4.7.1 Error Occurs?

Before we fix this error, lets learn a bit more about why this happens in the first place.

When you send an email, its the responsibility of the email client like Outlook, Squirrelmail to follow the protocols and send the email. The client connects to the mail server and then take steps to deliver the email to the recipient.

The recipient can be either external or internal to the sender’s mail server. Most, if not all, servers require that the mail account authenticates itself before connecting.

The 454 4.7.1 Relay Access Denied usually occurs because of the following reasons:

The email client is sending emails to an external mail server without appropriate authentication. The sending mail server will abort the process with the error message ‘Relay Access Denied’.

If the Postfix configuration settings are not set up properly, especially the relaying and recipient settings, you’re likely to get this error.

You will be able to see the error message in email logs and bounce messages like this:

Jan 29 10:11:11 user postfix/smtpd[2257]: NOQUEUE: reject: RCPT from unknown[***.***.***.***]: 454 4.7.1 <thismail@gmail.com>: Relay access denied; from=<user10@domain.com> to=<thismail@gmail.com> proto=ESMTP helo=<S>

Fixing this Error

Postfix, by default, doesn’t allow users to relay through the mail server. This is unless someone has added the IPs to the trusted network and excluded from authenticating to SMTP mail server.

When you get the error message, the first thing to check is the mail logs and bounce message. These offer insight as to why the error surfaced. You’d also get to know whether the issue is with the server settings or mail client.

If its with the email client, you can take certain measures to fix this error. The process is different for email clients like Outlook and Thunderbird and webmails like Squirrelmail and Roundcube.

Fixing the Error in Roundcube/Squirrelmail

When the configuration problem happen in third party software like Roundcube and Squirrelmail, no user can send emails from the server. In other words, the configuration are applied server wide. Therefore, its a much more serious issue.

In Roundcube, there’s a configuration file called ‘config.inc.php.’ It is used for SMTP configuration settings. When the settings in this file go wrong, you’re likely to receive the 454 error.

Likewise in Squirrelmail, the configuration file, config.php, is configured with conf.pl. When this is not configured properly, 454 error occurs.

To fix the error in Roundcube or Squirrelmail, the parameters in the file should be:
  1. SMTP server for outgoing messages
  2. SMTP authentication settings for users
  3. TLS/SSL settings for secure email delivery
  4. SMTP port for incoming and outgoing mails
Fixing the Error in Outlook/Outlook Express/Thunderbird

Outlook and Thunderbird are user specific email clients. Which means, users set the configuration for their own account rather than server-wide.

You need to look into the SMTP authentication and security settings in your account and ensure they’re accurate.

Fixing the Error in Postfix Servers

Most webhosts, mainly those running Plesk control panel, use Postfix as their mail server. These servers come with their Dovecot configured to handle POP and IMAP services.

When all the users in the Postfix server get the ‘Relay Access Denied’ error, it confirms that the problem is related to the Postfix server.

The error can be in one of the two places:
  • In the Configuration File
You can find the configuration file in Postfix at /etc/postfix/main.cf. Among other things, it contains mynetwork, which is a list of network that are permitted to relay through the mail server without the need for authentication.

When the file gets corrupted, you may get the 454 4.7.1 Relay Access Denied error and affect email delivery. So the first thing is to fix the configuration file and set it up properly. Contact the email provider for more assistance regarding this.
  • In the Postfix domain lookup database
The Postfix database has a list of local domain routes. When delivering emails locally, it looks up on this list. When the database gets corrupted or some of the entries go missing, the local domains fail to get any email.

Again, you’d have to contact the mail service provider to fix the database, considering that you don’t have access to it.

So that’s how you fix the Relay Access Denied error in Postfix. For more assistance, contact the hosting service provider.
Author
kumkumsharma
Views
31,219
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top