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.



Source link

Author

Write A Comment