Mail not sending from localhost

Hi, This is not a Hestia problem per se but I’m hoping someone has dealt with this. I have a Java app (4Minitz) running inside a docker container. On my last Hestia server it could send mail just fine, presumably everything is the same on my new Hestia server but I can’t seem to send any mail from it. Support from 4Minitz is non-existent. The only clue seems to be in the exim4 mainlog “TLS error on connection from [149.…] (recv): The TLS connection was non-properly terminated.” comes after each attempt at sending mail. It should be going out port 25 and I didn’t think that port was checking for TLS. Am I wrong? can I force port 25 to not check TLS ?

you probably want to provide more detail :wink:

is the app inside your docker container accessing exim4 on the host via smtp? if so, then probably your app is trying to run starttls but using a wrong domain name and therefore getting the wrong ssl cert delivered. or the ca/ssl-store within the container is missing some root/intermediate?
if you would want to turn off that tls usage, I’d assume you need to tell the app to not use it.

I had a quick look and their settings json does not look like offering anything for it. you probably need to check inside the container what kind of mail class or script they are using.

or just try to use a different domain in your smtp-url where you can make sure, that a proper ssl-cert is installed for in hestia.

Hi falzo,
I had this working flawlessly 3 months ago, then something bad hasppened to the server. It was all backed up and so I installed Hestia, again on Debian 10, and this new server is exactIy like the last one (Hestia might be newer but I’m not really sure). The 4Minitz app ran fine before. I have it setup the same way now.
I have tried running the App (4Minitz) in the container, like (docker run -it -d --restart unless-stopped -v /var/local/4minitz_storage:/4minitz_storage -p 3100:3333 -e MONGO_URL=mongodb://localhost:27017 4minitz/4minitz) resulting error:

2021-03-15 02:27:28 no host name found for IP address
2021-03-15 02:27:28 no host name found for IP address
2021-03-15 02:27:28 TLS error on connection from [] (recv): The TLS connection was non-properly terminated.

as well as directly in the host (docker run -it -d --restart unless-stopped -v /var/local/4minitz_storage:/4minitz_storage --net=host -e MONGO_URL=mongodb://localhost:27017 4minitz/4minitz). resulting error:

2021-03-15 02:23:18 TLS error on connection from [myServerlP] (recv): The TLS connection was non-properly terminated.

This is my mail setting for the App:
“smtp”: {
“mailUrl”: “smtp://[email protected]:[email protected]:25/”
Apparenty the app (4minitz) does not use StartTLS. So is this all because the Exim Setup in Hestia requires STARTTLS, even on port 25. It did not do this before.

Thanks for the Help.

I have to admit I did not exactly follow the changes in that regard, but I am pretty certain that we do not enforce ssl/tls only connections. so your assumption more likely is wrong.

again as said before, the domain used could be a problem, if there is no ssl-cert for it - if that’s the hostname did you get a ssl cert for it and did you set Hestia host certificate for that?

another thing that could have changed would be the allowed allowed protocols if using tls. aka exim only allows tls 1.2 and the app wants to negotiate on tls 1.1 - but I am also not sure, what the actual standard or setting is right now.

Thanks for replying.
I do have valid SSL certificates. It might be the TLS version. I’ll see what I can figure out. I’m not so good with the exim setting so I was really hoping someone here might jump in. You did, and I’m thankful, but my problem remains if anyone else would like to help.

I’m still having issue with this and I’m still hoping someone familiar with Exim can tell me why I’m getting this error on port 25 with the default Hestia/exim setup.
I think the problem is because Exim is advertising STARTTLS on all the smtp ports. Ho do I get it to not do STARTTLS on port 25 Like I said before Exim is not my friend.:frowning: