Question

Postfix can't send mails externally

Hi everyone,

I installed and configure on Ubuntu 16.04 droplet but it couldn’t send email externally.

I’ve tested this scenarios:

  • Send an internal emails, it works.
  • send an email from gmail or yahoo mail or other email service, it works too, so I receive the email in the appropriate mailbox.

The unique scenario that doesn’t work is when i try to send to an external email services such as google, yahoo, outlook or other site.

Looking into the Postfix logs I got the some different error messages: a. Network is unreachable b. Connetion timeout

Could you please help me? I already opened a ticket for looking into this issue (ports configuration and droplet exceptions) but I didn’t receive any feedback/new about the solution… so I’m considering change my VPS cloud provider.

Could you recommend me any other VPS Could server provider?

Thank you all your help.


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi! Can you please post the output of the following command?

nc -z smtp.gmail.com 25

If it does not output Connection to smtp.gmail.com port 25 [tcp/smtp] succeeded!, it’s possible that outbound SMTP is blocked on your droplet. In that case, the support team will be able to unblock it for you!

Hello there,

It’s possible that port 25 is closed for external uses for new accounts. There are a few ways to go about the problem

  • try using ports like 465 or 587 for SMTP
  • use a third-party solution only for your E-mails. Good examples are SendGrid.

To expand more on blocking port 25 for new accounts, this is something DigitalOcean has been doing to reduce spam on its network. It is more that we simply cannot accurately determine who is going to send it.

Stopping spam is a constant fight, so DigitalOcean has implemented some restrictions on newer accounts. Having said that, you can always contact them and ask for the port block to be lifted on:

https://www.digitalocean.com/support/

More information here:

https://docs.digitalocean.com/support/why-is-smtp-blocked/

Hope that helps!

I am facing the same problem. I run nc ... and no output…