Email server not working

OS type and version Ubuntu 22
Virtualmin version 7.10.0 Pro

Hello there,
My problem is that the email accounts aren’t working. I have 2 virtual servers running 2 domains with websites successfully, but I am unable to get the email accounts working… The Thunderbird email client just fails to connect to the mail server…
I need some support to troubleshoot this issue, any assistance would be greatly appreciated. Thankyou in advance. Cheers, Mike.

Also, if I log into Usermin, and try to use the webmail… if I try to send an email it fails with an error.

What error ?

You need to look at your logs to see what’s going on. I assume that postfix & dovecot are running OK ?

have you got an ipv6 address or just ipv4 … looks like you have not
so maybe edit



inet_protocols =  something (maybe all)

and change it to

inet_protocols = ipv4

then restart postfix

Thanks for your response @jimr1
I have tried editing /etc/postfix/ as you suggested… and it still gives me the same error.
Although when looking at the dashboard the Postfix Mail Server keeps on returning to “not running” state… see screenshot:

When I try to restart the Postfix Mail Server, it restarts… then stops again by the time I refresh the dashboard page…

open a terminal as root and type

service postfix status 

that may show the error as to why postfix isn’t starting

The terminal shows postfix as active, but Virtualmin shows Postfix as not running…
Does “Active: active (exited)” have anything to do with this?

I have tried “tail -n 100 /var/log/mail.log” and discovered this output:
Apr 30 01:10:01 oztinker dovecot: imap-login: Disconnected: Inactivity (auth failed, 2 attempts in 180 secs): user=<>, method=LOGIN, rip=, lip=, TLS, session=<3m3L/EUX+XOfxKgz>Apr 30 01:10:01 oztinker dovecot: imap-login: Disconnected: Inactivity (auth failed, 2 attempts in 180 secs): user=<>, method=LOGIN, rip=, lip=, TLS, session=<TevJ/EUX+HOfxKgz>Apr 30 01:14:49 oztinker dovecot: imap(<1081945><6HOY2EUXSXOfxKgz>: Disconnected: Connection closed: read(size=8113) failed: Connection timed out (IDLE running for 0.001 + waiting input for 1072.882 secs, 2 B in + 10 B out, state=wait-input) in=79 out=947 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
… is this output of any assistance identifying the problem?

I have also looked at /etc/postfix/ … and to my beginner’s level knowledge, it looked fine to me.

As I’ve tried to explain, the issue is that when I restart Postfix from the Dashboard, it restarts fine… then within about 60 seconds, Postfix stops running but just in Virtualmin.

Is there someone out there who can please assist me to understand and solve this problem, I would be so thankful. If I can provide any more helpful information, please just let me know.

How exactly are you logging in to Usermin? when you say “webmail” are you using the Virtualmin/Usermin GUI

Thanks for your response @Stegan
Yes, I have tested trying to send an email using the Virtualmin/Usermin GUI. That is where I get the error “connection refused”.

The servers status shows the Postfix mail server as not running… but when I try to restart Postfix using the dashboard, the start up process succeeds, but then immediately fails and returns to the not running state…

You DO have an AAAA record in your DNS?

On top of that you do have port 25 open in both firewalld and your providers firewall

Yes, I do have an AAAA record. Linode is my VPS host, and I have the AAAA records set up correctly.

It looks like port 25 must be closed. I tried “telnet localhost 25”, and I get the connection refused message. I looked up how to open port 25 on ubuntu, but the info I found says to use ufw. But my Virtualbox installation doesn’t seem to use ufw. How do I open port 25?

Does this not indicate a bad config file? this must be shown in the logs.

Have you looked at webmin->networking->firewalld ? To see if the port is open ?

Look back in the thread you will see the output from service postfix status which indicates that postfix has started correctly

Is this a vps install or on a home network ?

You may have to ask Linode to open port 25 on their end. I use them from time to time for development and always they had port 25 closed.