New Server - mail not working (SMTP on 25 doesn't seem to be open)


I’m trying to test WebMin/VirtualMin on a new VPS (hosted with contabo). They setup LAMP, I added VirtualMin and everything seems to be OK, pointed a bunch of test domains at it and setup the virtual servers, and that all seems to have worked OK. test websites work, but mail doesn’t. When I do a port scan to the server I don’t see 25 open, and when I do a DNS Report from I get this error, “failed message send with: failed cx open with: failed socket connect with: Connection refused”.

I’m coming from a semi managed cPanel environment, so all a bit of a learning curve… where should I start looking to work out what is/isn’t working properly.

Many thanks



Port 25 is open by default – is it at all possible that your provider is blocking that port? Some providers block that by default.

You can see if Postfix is running though with this command:

netstat -anlp | grep :25

And you can see if there are any firewall on your server with this command:

iptables -L -n

Further to Andrey’s post - you might be best off emailing or contacting Contabo’s support team\function and asking them if Port 25 is blocked by default and maybe you (thru a control panel) need to open it - or they need to open it. Or maybe port 25 is closed and you need to relay thru their mailserver.

Hi Guys,

Thank you both for the quick replies. i did contact Contabo support, and they have assured me that they don’t mess with anything on the server, that is is all our responsibility (understandable at the price they have supplied it at!), so I’ll follow up on Andrey’s tests and see what else I can find.

^^ Andrey’s steps
Might be a shot in the dark but check if your firewall is allowing it (GUI steps, distro not specified) login to virtualmin > webmin(top left) > networking > Linux Firewall or FirewallD (depending on distro)

Well I started to try and troubleshoot… connected to the server via UltraVNC… and inadvertently rebooted the server!.. however,once it came back up SMTP was working OK.

So didn’t actually find out what was stopping it, but it seems OK now - so I take that as a win :slight_smile:

Thanks for the quick responses and pointers everyone, good to know there is a group like this to go to when I get stuck.

Many Thanks!

Sometimes for settings / configs a reboot is needed.

Contabo doesn’t block ports sofar i know. :wink:

You have to take care if using the dns in panel from contabo that part.

Also some files/settings for ip they provide.

And you can ask their support to have a look. ( but not for virtualmin support , network and server time yup could make sense)

OYEA take care of the reverse dns setting correct in control panel from contabo to have mail… :wink:

And ofcourse all i write above also for the IPv6!!!