• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Can't send mail - can't telnet to any destination on port 25

Giacomo Berdondini

New Pleskian
Hello, after quite a lot of research I still haven't found a solution to this issue and I hope I can find one.
I have a server that runs Plesk Onyx Version 17.0.17 Update #35, running on a 1and1 virtual cloud server.
I noticed that since I started configuring the server I wasn't able to send any mail.
I checked the log and found that:
Oct 5 18:29:34 posrv3 postfix/smtp[51074]: 9FCB51214AA: to=<[email protected]>, relay=none, delay=33992, delays=33962/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.register.it[195.110.124.132]:25: Connection timed out)
Every time I try to send an email I would end up receiving this kind of error. All messages are stored in the mail queue.
Since that seemed strange to me, I immediately double checked the firewall on the 1and1 side and made sure that port 25 wasn't blocked.
I tried to do a simple: telnet mail.register.it 25 and that didn't work. The same command worked on another server I manage (1and1 cloud server) and from my personal workstation.
I checked iptables and i got this result:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-ISOLATION all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain DOCKER (1 references)
target prot opt source destination

Chain DOCKER-ISOLATION (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere

I'm no expert of iptables but I think that means that OS isn't blocking anything.

Then I tried to connect to the server from my personal workstation on port 25 (telnet my.serveraddress.com 25) and it worked. In fact I can send mail to the addresses hosted on the server and all the mail are delivered properly.
From the server machine, I tried to telnet different servers on port 25, but got no luck: it didn't work.
Finally, on the server machine, I tried to telnet the machines on different ports (80, 110, 465, etc.) and it worked without any problem. It seems the system just isn't able to make an outbound connection on port 25.

Since I'm still setting up the machine, I haven't touched or tweaked config files and just added some users/subscriptions/domains.


I think I'm missing something very stupid here. Anyone can help?
 
Why don't you think that this port can be blocked not on your Plesk server, but somewhere in the network infrastructure of your service provider? Have you tried contacting their support?
 
I don't think that because I have another server from the same provider and I had no troubles at all in configuring the mail server and, after a couple of days of internet research, I stil haven't found anyone having this issue with 1and1 cloud virtual servers.
For sure I will contact their customer service, but as I said earlier, I feel like I'm missing something very stupid and I thought maybe I could find some help to investigate more in the problem I'm facing.
 
The reason may be that the virtual server for which port 25 is available can be located on the hardware node without restriction for the port 25. And that virtual server, where this port is unavailable, is located on the hardware node for which this port is closed.
 
It turns out that @IgorG, you're completely right.
1and1 blocks by default all outbound connection on their Virtual Cloud Servers on port 25, for security reason.
As pointed out in this blog post: Memory Sieve: 1and1 Cloud Virtual Server outgoing smtp email blocked you have to call their assistance and ask to open the port.
I just got off the phone and it took them a couple of minutes to fix the problem.
Hope this can help anyone facing the same issue.
 
Hi, I know it's an answered thread.. however, this thread made me discover my real problem!

I fixed my problem with 1and1 - Cloud Server, by default 1and1 really block the port 25..

I also called the server support by phone and they open the port 25.. and then they ask me to go into the:
- Cloud Panel > Network > Firewall Policies > Single Left Click on "centos7-64Plesk_Onyx" > Configuration > Incoming > (table last row) write 25 in port and click Add Rule (Green Check Button)

Voila, now I'm able to send email with php mail() function or use the RoundCube!

Thanks,
Charles
 
Back
Top