SMTP error - Sending of the message failed

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.021
Virtualmin version 7.7 Pro
Related packages SUGGESTED

Hello,

I migrated 10 websites from cPanel and intend to add more to Virtualmin.

On several occasions, emails from clients fail to send and I receive this error message:

“Sending of the message failed. The message could not be sent because connecting to Outgoing server (SMTP) mail.maximo.rs failed. The server may be unavailable or is refusing SMTP connections. Please verify that your Outgoing server (SMTP) settings are correct and try again.”

All websites have SSL certificates that I set up for each site after migrating to Virtualmin.

Currently, all sites are working without any problems, but email accounts have a delivery problem on all 10 domains. I cannot find anywhere to see what the problem is because, for example, yesterday most emails worked, but today it is giving this error.

I have no idea what this could be related to, whether it’s related to Topserver, DNS, SMTP, or SSL. Does anyone have an idea of what could be the problem?

Thank you very much.

Did Postfix stop? Firewall?

Yes, it does. But when I try to start it, it just starts, and then on refresh, it stops again.
Will check now Firewall.

Firewall can’t cause Postfix to fail to start.

You need to look at the mail log, always, to know why mail is failing. The client has no useful information. On Debian that’d be /var/log/mail.log (or maybe in the journal for the various mail services, like postfix and saslauthd).

It’s quite frustrating that I’m unable to get everything working smoothly on this Virtualmin. Despite having migrated 10 domains, nothing seems to work after installing SSL. It starts working and then stops after a while.

I would have really appreciated if some things were simpler on Virtualmin, but it seems like an impossible task. For some unknown reason, it’s not sending emails and displaying that Postfix is not working, as shown in the picture, even though the Server Status shows it as off.

It seems like I’m not competent enough to handle Virtualmin.

And this is /var/log/mail.log

May 4 16:12:23 example-hostname dovecot: pop3-login: Login: user=example@example.com, method=PLAIN, rip=212.242.121.108, lip=196.195.248.155, mpid=250612, session=<rcsacOD6+TfUyLVp>
May 4 16:12:24 example-hostname dovecot: pop3(example@example.com)<250612><rcsacOD6+TfUyLVp>: Disconnected: Logged out top=0/0, retr=0/0, del=0/4519, size=3622206069
May 4 17:52:02 example-hostname dovecot: imap(example@example.com)<237370><7Rk2/N76y8XUyBVq>: Logged out in=6806 out=28118 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
May 4 17:52:24 example-hostname dovecot: imap-login: Login: user=example@example.com, method=PLAIN, rip=91.148.103.195, lip=196.195.248.155, mpid=269131, TLS, session=<y+PK1eH6wr5blGfD>
May 4 17:52:25 example-hostname dovecot: imap(example@example.com)<269131><y+PK1eH6wr5blGfD>: Connection closed (SELECT finished 0.142 secs ago) in=99 out=1026 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
May 4 17:52:34 example-hostname dovecot: pop3-login: Login: user=example@example.com, method=PLAIN, rip=91.148.99.192, lip=196.195.248.155, mpid=269133, TLS, session=<nrVU1uH60/5blGPA>
May 4 17:52:34 example-hostname dovecot: pop3(example@example.com)<269133><nrVU1uH60/5blGPA>: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
May 4 17:54:05 example-hostname dovecot: pop3-login: Login: user=example@example.com, method=PLAIN, rip=212.200.181.105, lip=196.195.248.155, mpid=269263, session=<9snM2+H64xnUyLVp>
May 4 17:54:06 example-hostname dovecot: pop3(example@example.com)<269263><9snM2+H64xnUyLVp>: Disconnected: Logged out top=0/0, retr=0/0, del=0/4519, size=3622206069
May 4 17:54:58 example-hostname postfix/postqueue[269694]: warning: Mail system is down – accessing queue directly
May 4 17:55:32 example-hostname dovecot: pop3-login: Login: user=example@example.com, method=PLAIN, rip=22.146.185.122, lip=196.195.248.155, mpid=269953, TLS, session=
May 4 17:55:32 example-hostname dovecot: pop3(example@example.com)<269953>: Disconnected: Logged out top=0/0, retr=0/0, del=0/12, size=437235

This is just a part…

Dovecot is not involved in receiving mail, and doesn’t tell you anything about postfix.

Confirm postfix actually isn’t running:

systemctl status postfix

If postfix is failing to start, we need to see the relevant mail.log entries when you try to restart postfix in order to troubleshoot it. So, start tailing the mail.log (tail -f /var/log/mail.log) in one terminal and in another terminal restart postfix (systemctl restart postfix).

If postfix is actually running, it’s possible there is some other misconfiguration leading to Webmin not knowing it’s running.

If postfix is running, you still need to look for relevant log entries when you try to send mail. You need to look for log entries related to the problem you’re trying to solve. So, tail the log and then perform the action that is failing while watching the log.

It obviously seems hard to solve a completely mysterious problem. You need to know what the problem is before you can try to solve it, and only the log knows that.

I’ll also note that the most common problem with sending mail is that a lot of hosting providers do not allow their clients to send mail directly from their servers. They block port 25 and require you to use a relay service to send mail. You can also test that, you don’t have to guess.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.