Question

How to make outgoing port 25 work again, after a droplet resize?

Hello,

After a droplet resize, the port 25 for outgoing emails is not working anymore. All of our business depend of the emails. It is very important for us to send automatic messages for our users about billing, account details and password verification. I had already checked iptables and ufw and it is ok. How do I make the port 25 to start working again, like it was before the droplet resize?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

jarland
DigitalOcean Employee
DigitalOcean Employee badge
April 15, 2019
Accepted Answer

Greetings!

In most cases the firewall or MTA (postfix, exim, etc) logs are what you want to check. In your case, however, there was a different cause. From where I sit, your account should not have been able to use port 25 before or after the resize, as we are blocking SMTP on your account. I can’t speak to how you were able to before, but I’ve reviewed your account personally and chosen to remove the block on your behalf.

Jarland

You may be familiar with the word – PORT. It is a very commonly used word in relation to computers.

You might have headered from someone asking if your laptop has a USB or HDMI port.

In a layman language, ports are a gateway to connect to an external device for communication.

When it comes to Port 25, we are really not talking about these hardware linked port. Port 25 is actually a virtual port coined somewhere near 1982. There was a Request for Comments (RFC) 821 was published, to add port 25 as the default gateway to send and receive emails.

It has been 3 decades and we are still using port 25 as the default port for transmitting email messages. Over the years, few more RFCs came which actually obsoleted the initial SMTP RFC 821. But, still port 25 is there and that also a default port for email transmission.

Over a period of time, developers started facing challenges with default port 25 mostly because of the security concerns, which in turn gave birth to two new ports 587 and 465. Recently you might have started hearing about port 2525, which is nothing but a mirror to port 587. This is primarily used when the port 587 is blocked.

Most Internet service providers now block all outgoing port 25 traffic from their customers as an anti-spam measure. For the same reason, businesses will typically configure their firewalls to only allow outgoing port 25 traffic from their designated mail servers.

Sending emails over port 25 is not really secure and because this is the default port, so it been extensively used by the spammers too.

Basically, when a computer gets infected by a virus it can be hijacked by the virus creators to send out thousands, if not millions of spam emails – the ISPs have to prevent this from happening and blocking the port is the only real solution.

How to check if Port 25 is blocked on your network? There are some common error messages which you might encounter;

2014-08-31 17:13:00 SMTP ERROR: Failed to connect to server: Permission denied (13) Connection unexpectedly closed: timed out Timeout::Error (execution expired) S: SMTP ERROR: QUIT command failed: Connection: closed SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP connect() failed. SMTP -> ERROR: Failed to connect to server: Connection timed out (110) SMTP Error: Could not connect to SMTP host. There can be more. This is just a sample list. All these are errors from different programming environments, but all lead to a common problem that your outgoing port 25 might be blocked.

You should know the error codes well to proactively troubleshoot.

There are multiple ways to check if a particular port is blocked on your network, the simplest one to check this is using the telnet command on your terminal.

Type the following command: telnet example.com 25

View Results: If Port 25 is not blocked, you will get a successful 220 response (text may vary). Trying 64.13.192.208…

Connected to example.com.

Escape character is ‘^]’.

220 cl34.gs01.gridserver.com ESMTP Exim 4.63 Tue, 24 Jun 2008 13:45:04 -0700 If Port 25 is blocked, you will get a connection error or no response at all. Trying 64.13.192.208…

telnet: connect to address 64.13.192.208: Connection refused

telnet: Unable to connect to remote host There is one more tool outPortson Github, which is very user-friendly when it comes to checking the outbound ports. But, yes it has multiple dependencies that need to be installed to start using.

Choose the right port -> https://pepipost.com/blog/25-465-587-2525-choose-the-right-smtp-port/

Hi @jarland . can lift up the port banned for me too? Currently im using iredmail to setup this, but it seem the cause im not able to send and email is because the port 25 is not available.

hope you can help me on this.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel