Fatal Error! Failed to send mail : SMTP command failed : 421 4.3.2 All server ports are busy

SYSTEM INFORMATION
Ubuntu 20.04.6 LTS 64-bit Linux 5.15.0-79-generic on x86_64 REQUIRED
Webmin version 2.101 REQUIRED
Virtualmin version 7.7 Pro REQUIRED
Postfix SUGGESTED

When sending mail from Usermin 2.001 I get an error “Fatal Error! Failed to send mail : SMTP command failed : 421 4.3.2 All server ports are busy”

I can receive mail OK.

Maybe your hosting provider blocked SMTP port?

“Before you get to use SMTP port 587 to send out emails, you need to check its connection first. Here, we will show you how to check if the SMTP port 587 is not blocked. By the end of this article, you’ll be able to know whether or not you can integrate the port with your email service.”

Maybe it helps: How to Check if SMTP Port 587 is Not Blocked: A Step-by-Step Guide

Hi xlad,
I have run the telnet “telnet www.eoscommunications.com.au 587” and got back,
220 eoscommunications.com.au ESMTP Postfix (Ubuntu)

However when I ran “telnet www.eoscommunications.com.au 25” I got this,
421 4.3.2 All server ports are busy
Connection closed by foreign host.

Checked if ports are listening

tcp LISTEN 0 100 0.0.0.0:25 0.0.0.0:* users:((“postscreen”,pid=54577,fd=6),(“master”,pid=40003,fd=13))
tcp LISTEN 0 100 [::]:25 [::]:* users:((“postscreen”,pid=54577,fd=7),(“master”,pid=40003,fd=14))

tcp LISTEN 0 100 0.0.0.0:587 0.0.0.0:* users:((“smtpd”,pid=55121,fd=6),(“master”,pid=40003,fd=110))
tcp LISTEN 0 100 [::]:587 [::]:* users:((“smtpd”,pid=55121,fd=7),(“master”,pid=40003,fd=111))

You can check [Webmin] > [Networking] > [FirewallD] and see if you have opened port smtp (25)

Your port 25 is opened, so you should be able to send mails Port Checker - Check Open Ports Online

Edit: I’d check for a misconfigured fail2ban or something like that


Just checked the fire wall and ports 25 and 587 are open

The fault has progressed. I’m no longer getting the error code on send. However, the emails are now Queueing in the postfix mail server.

Try at email settings to send from Virtual Server IP (last pic)

If not, investigate sendmail (iptables - Port 25 blocked but Firewall is off - Server Fault)

Edit: if is a new server try to uninstall purge sendmail AND postfix, than just reinstall postfix with defaults. It may be a conflict between them two (one send to another or just wait for another and is time consuming to debug…)

Ok so now emails are just sitting in Postfix Mail Queue.

If you press on Flush Queue Postfix will try to send them

Thank you xlad. It’s so nice to have people out there to bounce problems off.
I had a look through the Postfix config files and made a couple of changes that have helped resolve the problem.

After reading this (Setting the "Use SASL SMTP authentication?" option to 'Yes writes incorrect configuration option to main.cf [#58454] | Virtualmin) I commented out this line #smtp_sasl_auth_enable = yes in the main.cf file

Then I uncommented this line smtpd pass - - y - - smtpd in the master.cf file

Everything seems to be working again.

First thing first make a backup before any changes :slight_smile:
I’m glad it worked out.

I’m on Debian 11. The original settings are what I have and worked fine. I’m not sure disabling sasl auth and switching to simple password, which is what I think you did, is a real solution and could lead to problems in the future. How long has the server been in service before this happened?

Hi ID10T
Just to clarify by changing these 2 lines in the postfix config I have unknowingly disabled SASL SMPT authentication therefor prooving to myself that I am a little to simple for Mail server administration.

#smtp_sasl_auth_enable = yes
smtpd pass - - y - - smtpd

I did leave the smtpd_sasl_auth_enable = yes line active in the main.cf

I love the ID10T username I think mine shuold be 5LOW :wink:

This all started because Im trying to please the Google overloard. Gmail keeps bouncing my emails. So I enabled some SFP added a little DKIM turned on a lot of SASL then nothing. I think I would be better off burning some incense and sacrificing a goat to please Google.

I’m no expert on Postfix.

Regardless of the SASL implementation type, enabling SMTP authentication in the Postfix SMTP server always requires setting the smtpd_sasl_auth_enable option:

/etc/postfix/main.cf:
smtpd_sasl_auth_enable = yes

http://www.postfix.org/SASL_README.html