Bobcares

Postfix error mail transport unavailable – How we figured it out

by | Nov 2, 2019

There are lots of undelivered outgoing emails in my server and I see an error message as Postfix error mail transport unavailable! . What I need to do?

One of the typical postfix errors which creates a problem for many of our customers.

Mail transport unavailable error mainly happens due to a bad setting in the Postfix configuration file.

At Bobcares, we often get requests to fix postfix errors as part of our Server Management Services.

Today, let’s get into the details and see how our Support Engineers fix postfix errors like mail transport unavailable.

 

The top reason for Postfix error mail transport unavailable

In the business world, there has been a growing need for a Linux mail server. Thanks to the Postfix mail server which is a reliable mail server for your business needs. Also, it acts as a Mail Transfer Agent that transfers mails from the server to other servers, on SMTP Protocol.

Frequently, the postfix customers may face errors like mail transport unavailable while managing Postfix mail servers. The top reason for this error is the misconfiguration of Postfix.

 

Fixes for Postfix error mail transport unavailable

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while managing the Postfix mail server.

Now, let’s see the major reasons for this Postfix related errors and how our Support Engineers fix the top errors.

 

1. Typo errors in variables

Recently, one of our customers had a problem with a recently configured postfix MTA. When he tried to start the postfix the following warning appears.

postfix/qmgr[7288]: warning: connect to transport private/amavis: Connection refused
dsn=4.3.0, status=deferred (mail transport unavailable)

On checking /var/log/mail.log, our Support Engineers found a misconfiguration in master.cf configuration file. It was a typo error.

For example,

Here, our customer had mistakenly set up as no_unknown_recipient_check in the /etc/postfix/master.cf file instead of “no_unknown_recipient_checks”. So, the typo error caused a misconfiguration in the Postfix file and blocked the proper working.

So, we changed no_unknown_recipient_check to no_unknown_recipient_checks and solved the problem. Also, we make sure the given settings in the Postfix configuration are correct or not.

In addition, whenever we change files in /etc/postfix, it may always run postmapon the file to update it.  Otherwise, postfix doesn’t update an existing one.

The basic synopsis is,

postmap [-Nbfhimnoprsvw] [-c config_dir] [-d key] [-q key] [file_type:]file_name

That’s it.

 

2. Postfix misconfiguration

Likewise, several Plesk server owners complain that their email messages are stuck in the mail queue leading to loads of undelivered outgoing emails on the Plesk server.

While checking the mail log in /var/log/maillog, we can see the following error.

postfix/qmgr[14111]: warning: connect to transport private/XXX.XX.X.XX-: Connection refused
postfix/error[21724]: 0A1322CF16C: to=james.doe@example.com, relay=none, delay=0.07, delays=0.03/0.01/0/0.02, dsn=4.3.0, status=deferred (mail transport unavailable)

Therefore, the wrong Transport setting may create the above error. So, this can be edited via Tools & Settings > Mail Server Settings. And, while running the below command, we can see the settings too.

postmap -s /var/spool/postfix/plesk/sdd_transport_maps

Then, we check the /etc/postfix/master.cf where the sdd_transport_maps are defined in the first column of smtp_bind_address option.

grep "smtp_bind_address" /etc/postfix/master.cf

In addition, to be able to connect, smtp_bind_address needs to be defined as mentioned in the mynetworks section.  For Plesk versions above 12.0, the mynetworks variable should be empty.

# postconf mynetworks
mynetworks = 

Again, we white-listed IP addresses in Plesk > Tools & Settings > Mail Server Settings > White List tab. If so, they will be added to mynetworks section.

The Postfix mail settings on the Plesk server appear as:

mail_transport_unavailable_postfix_error

Finally, we restart the service.

service postfix restart

This is how we fixed the problem.

 

3. Problems with Dovecot

Similarly, another customer had a problem while receiving emails after setting up Postfix and Dovecot on his ISPConfig server. He got an error like,

Postfix status=deferred (mail transport unavailable)

Often, problems with emails receiving may happen due to bad Dovecot settings on the server. This is because Dovecot is responsible for receiving emails from the server to the local systems. It delivers mails from the server to Thunderbird on IMAP or POP3 Protocol.

On checking, our Support Engineers found the customer had set up as below,

${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender}

But, it was not proper.

Therefore, we changed as below.

dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

This solved the error.

 

[Need assistance to fix Postfix error? We’ll help you.]

 

Conclusion

In short, an error like postfix error mail transport unavailable can occur due to the bad settings in the Postfix configuration file. Today, we saw how our Support Engineers fixed Postfix related errors.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF