Can't send emails from VPS nethserver

NethServer Version: 7.9.2009 (final)
Module: Email, SOGo

Hi folks,

after installing a new nethserver on a IONOS VPS server I am able to receive mail, connect via IMAPS and also send mails internally between the created users. But sending emails to addresses outside the nethserver is not possible - the mails stuck in the queue.
Could it have something to do with the special network config in a VPS environment? I think about that dummy0 interface and that maybe the route the email has to take in the nethservers services is not correct? I tried to check the postfix configuration but I didn’t see any obvious misconfigurations.

regards
Sehne

some log entries:

postfix/smtp[10760]: connect to mail-mta.xxx.yy[x.x.x.9]:25: Connection timed out

Why does postfix try to send on port 25? I have a LE certificate installed and wonder why postfix does not use port 465.

postfix/smtp[10760]: connect to mail-mta.xxxxx.yy[x.x.x.x]:25: Connection timed out
postfix/smtp[10760]: 0BC7F4A2950: to=sehne@xxxxx.yy, relay=none, delay=1036, delays=976/0.25/60/0, dsn=4.4.1, status=deferred (connect to mail-mta.xxxxx.yy[x.x.x.x]:25: Connection timed out)

It doesn’t matter through which client I try to send - using SOGo, Thunderbird, or whatever other client - the mails stuck in the queue.

When I connect via telnet I get on port 465 this message:

rying x.x.x.x…
Connected to mail.xxxxxxxx.yy.
Escape character is ‘^]’.

But when connecting to port 25:

Trying x.x.x.x…
Connected to mail.xxxxxxxx.yy.
Escape character is ‘^]’.
220 xxxxxx.xxxxx.xxxxx ESMTP Postfix

Shouldn’t I get the same message on both ports?

regards
Sehne

Hi @sehne

Just for your Info:

All mails between Mailservers in the Internet are sent via Port 25, unencrypted! If any encryption is used, it’ still must use port 25, and only later implements can use TLS. Any form of Authentification is not allowed between servers. Authentification in SMTP were not there in the beginning, that’s why Port 465 came in as a “clutch”, later the official 587 appeared. Port 25 CAN nowadays include authentification, but again, this is ONLY thought for clients sending mail…

Port 465 has NEVER been an official, RFC Port for mail, one should not be using that hack from pre 2000 for that purpose.

Port 587 is the correct encrypted port for sending mails - but only between server and client and vica-versa.

I assume your Hoster is blocking SMTP Mail / Ports, something often done to reduce spam. Some will only open the port if you reqest it, some will require additionaal costs… :frowning:

My 2 cents
Andy

1 Like

Hi Andy,

thanks for your reply. Of course you are absolutely right - thanks for clarifying my missing knowledge about smtp. I searched for mistakes I made where no mistakes were. And I obviously got a little bit confused.

In the end you are right with your assumption about the blocked smtp port. I just called the support of my hoster and they told me that they have to unblock port 25. Oh man - I feel a bit like a fool that I didn’t call the hoster earlier. Especially because I read before in other threads that some hosters block the SMTP port (probably even you have written it to others :slight_smile: ).

Anyways - thank you very much for your support Andy!

Have a nice weekend!
Sehne

1 Like

Hi @sehne

Don’t forget this, it may help someone else:

My 2 cents
Andy

You probably got it solved by asking the hoster to open port 25 for your server.
A workaround should be possible. Any hoster that blocks port 25, most likely offers a smarthost for smtp.
Setting that smarthost will deliver your mails for you.

Hi Rob,

yes I got it solved by speaking with the hosters support. They opened port 25 for my IP address and now I am able to send emails. I searched for a smarthost but as I rent just the “pure” VPS server with no other services there is no smarthost for me to use. But it will be an alternative for others, for sure.

regards
Sehne