2017-02-09

This is a commonly seen email failure error by web hosts, website owners and server owners who run Postfix mail server. 454 error usually happens while sending to and receiving from external domains.

In our role as Outsourced Support Specialists for web hosting companies, we handle many such mail errors and fix them. Here, we’ll see what causes “454 4.7.1 Relay access denied” error and how we fix it.

What causes “454 4.7.1 Relay access denied” in Postfix servers

In mail delivery process, a mail client such as Outlook, Squirrelmail, etc. is used by the sender to send an email. The mail client connects to the sender’s mail server and attempts to deliver the mail to the recipient.

The recipient can be within the same mail server or in any external mail server. But most mail server require the mail account has to authenticate itself correctly, inorder to connect to it to send mails.

Error 454 is shown in the email logs and bounce message to users, usually when they send, forward or receive mails in Postfix mail servers. There are 2 main causes for this error.

If the mail is attempted to send to an external mail server without proper authentication, the sending mail server will reject the mail with the error “454 4.7.1 Relay access denied”.

This error message is also seen due to improper configuration settings of Postfix, such as relaying and recipient settings.



Email delivery process

Here, we’ll see how to fix the error “454 4.7.1 Relay access denied” that users get while using Postfix servers for email delivery.

1. How to fix “454 4.7.1” in mail clients – Outlook, Squirrelmail, Thunderbird and Roundcube

Unless specifically excluded from authenticating to SMTP mail server by adding the IPs to the trusted network, Postfix does not allow anyone to relay through the mail server.

Incorrect settings in the email client can cause mail delivery to fail, when the mail account tried to send a mail to an external domain from a Postfix server, without proper authentication.

So the first thing we do when users report 454 error is to check and confirm why the error happened in that server. Checking the mail logs, bounce message and confirming with other email clients help to pinpoint if the issue is with the mail client or server settings.

While Outlook and Thunderbird are user specific email clients and have to be configured by individual users, webmail such as Squirrelmail and Roundcube are installed and configured server wide.

If any configuration mistake happens in the installation process of 3rd party software such as Roundcube and Squirrelmail, no user from the server would be able to send mails using these webmail clients.

How to fix “454 4.7.1 Relay access denied” in Roundcube and Squirrelmail

Roundcube has a configuration file ‘config.inc.php’, which is used for the SMTP configuration settings. If the settings provided in this section go wrong during the setup, it will give 454 error.

In Squirrelmail, the configuration file is ‘config.php’ and is configured using the Perl script ‘conf.pl’. We’ve seen that webhosts who have not configured it correctly, have users facing error 454 while sending mails.

At Bobcares, our Tech Support Specialists have expertise configuring 3rd party software such as Roundcube and Squirrelmail for our customers who are web hosts.

The parameters we configure for smooth SMTP functioning are:

SMTP server for outgoing messages.

SMTP authentication settings for users.

TLS/SSL settings for secure email delivery.

SMTP port for incoming and outgoing mails.

Once the configuration of Roundcube or Squirrelmail or other webmail clients are properly done, users can send emails without any errors.

How to fix “454 4.7.1 Relay access denied” in Thunderbird, Outlook Express and Microsoft Outlook

In cases where we notice that the issue is not a server wide one, but specific to the user account, it is obvious that the error has happened due to incorrect email client settings of that user.

Some of the commonly used email clients are Outlook Express, Microsoft Outlook, Thunderbird and so on. The settings for SMTP authentication, SMTP server and security varies in each mail client.

We provide the end users with the step by step details to configure their email clients, which prevents email delivery failures with the error “454 4.7.1 Relay access denied”.



Mail client configuration settings for SMTP

2. How to fix “454 4.7.1” error in Postfix servers

Many webhosts, especially the ones who have Plesk control panels in their servers, use Postfix as the mail server. These servers mostly have Dovecot configured for POP and IMAP services.

If we notice from the email logs that all the users in the server are getting “454 4.7.1 Relay access denied” error while sending to and receiving mails from external domains using all mail clients, we confirm that the issue is related to Postfix server.

Postfix configuration can have errors in two sections:

1. Errors in the configuration file

The configuration file for Postfix is ‘/etc/postfix/main.cf’ and it contains the list of networks (mynetworks), who can relay through the mail server without authenticating.

The config file also has sections for relaying and authenticating mails. If this config file ‘main.cf’ gets corrupted during modifications or updates or setup, it can affect email delivery.

We’ve see cases where even a single white space in the file can mess up the configuration. With years of experience handling such issues, our expert engineers are able to resolve the mail server errors without much downtime.

2. Corruption in Postfix domain lookup database

Postfix stores local domain routing details in databases for Plesk servers, and this information is looked up during mail delivery locally. If this DB gets corrupt or has missing entries, email delivery to local domains fail.

Mail service is crucial for online businesses. Web hosts need to ensure seamless mail delivery services for their customers, for sustaining their business.

Bobcares engineers think from webhosts’ shoes, which is why we focus on resolving email errors in a few minutes, with our effective debugging of server logs, configuration and error messages.

In our customers’ servers, we proactively secure and audit the mail servers to avoid any issues that could affect the services. If you’d like to know how you can better support your mail users, we’d be happy to talk to you.

The post How to fix error “454 4.7.1 Relay access denied” in Postfix mail servers appeared first on Bobcares.

Show more