Trying to set up email server, can't send mail through email client + other issues

Okay so I’m a complete noob when it comes to web administration as well as Linux in general to some extent. However because I’m hosting a website I need to at least figure out some stuff. Originally I had a simple shared hosting, but I decided to upgrade to a much cheaper and potentially superior VPS solution. After completely messing up my initial installation after trying to setup a web and mail server by hand, I decided to start over and install virtualmin. So far everything works far better than it did previously, including the email server setup which at the very least is now working. However, there are still a couple issues that I’m trying to deal with but I just can’t get to work at all.

The issue I’m having is that while sending and receiving emails works flawlessly after setting up the email accounts in virtualmin, setting up an MX record in my DNS settings (“mail” points to @), and so forth, I don’t have the same success by using a mail client. Currently I’m trying it on Mailbird and although I haven’t tried other clients I’m skeptical that that is what the issue is. So I want to use IMAP, right. In the incoming server I put “”, chose “unencrypted” as the encryption setting, and the port defaulted to 143 which I haven’t changed. As for the username I put “” and entered the password. So far so good, email syncs flawlessly, if I receive an email it updates in a fairly short amount of time, so far so good. However, if I try to SEND something through the client, it refuses. So in the outgoing servers settings, there is an option called “test connection” which does what you think it does, and it reports with an error along the lines of that it timed out. The configuration is exactly the same, for the record, except that the port is defaulted to 25. There is also a checkbox that says “require authentication”, and I’ve tried with it on and off.

Attempting any other port, any other address will result in it telling me that it refused entirely. Additionally, SSL/TSL encryption doesn’t work at all either, I’m not sure whether this is a necessary safety measure but if so I’m really interested in trying to get it to work. I tried briefly disabling firewalld which caused problems previously, but that didn’t do a thing. My next attempt was to essentially try and switch the outgoing server port because I’ve heard something about ISPs blocking it, and I had no other way of verifying it. However I can’t get that to work because when I try to change any mail-sending settings in Webmin > Webmin Configuration > Sending Emails and then I click “save”, it doesn’t actually update the settings! There was also a setting there to enable SSL encryption but again if I select that, save, and return to it, it just resets to what it used to be. Even after trying restarting webmin, restarting the whole server, etc. it still doesn’t work.

Again, I’m a complete and utter noob at all of this so I really know nothing in regards to stuff like diagnostics and such, and anything I’ve searched on the web came up to be inconclusive or too specific for my level of knowledge. If anyone has any advice, I would really appreciate it.


Have you tried enabling mail client autoconfiguration? It’s available at Virtualmin > Email Settings > Mail Client Configuration.

Not sure if Mailbird support it though. Works for Thunderbird.


Yes, that setting is turned on. I decided to try it in a few other email clients and after noticing that it worked fine on Microsoft Mail, I installed Thunderbird to try it on. The default settings are detected but oddly enough they don’t appear to work without a bit of tweaking. However that’s when I realised that my original mail client (MailBird) was trying to connect to the wrong port, I set the outgoing port to 587 and suddenly everything works flawlessly. So at least I’m glad that’s fixed.

However SSL/TSL doesn’t work so I’m forced to stay unencrypted. Do you think that SSL/TSL is a necessary feature or is it okay if I left it as is? If so, how do I set it up? I honestly just don’t understand at all how this all works.


SSL/TSL is absolutely necessary. You’re exposed without it.

There are couple of ways you could enable SSL certificate for The way I prefer is adding as an alias to This way is included in the main certificate file.

I have a tutorial about setting up a mail server with Virtualmin. It might help you.

Garirry is it solved now?

While a few weeks ago there was a client of Virtualmin having issue to, Virtualmin support did solved that but the topic is private. in this forum
So don’t know if that is kind of the same problem and also don’t know the solution