Question

DigitalOcean blocked port 25? We have to use 3party relayhost ? eg. a free mailjet

Oct 23 17:23:03 sapp postfix/smtp[104720]: connect to gmail-smtp-in.l.google.com[142.251.10.26]:25: Connection timed out
Oct 23 17:23:03 sapp postfix/smtp[104720]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c00::1b]:25: Network is unreachable
Oct 23 17:23:33 sapp postfix/smtp[104720]: connect to alt1.gmail-smtp-in.l.google.com[173.194.202.26]:25: Connection timed out
Oct 23 17:23:33 sapp postfix/smtp[104720]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400e:c00::1b]:25: Network is unreachable

I tried every suggested method:

  1. Set hostname to FQDN.
  2. Set PTR in DNS.
  3. Set spf in DNS.
v=spf1 include:_spf.google.com include:spf.mailjet.com +a +mx +ptr +ip4:128.199.246.555 ~all

Postfix is still unable to send mail to Gmail.


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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 4, 2021
Accepted Answer

Hello,

It is possible that port 25 is closed for new accounts. This is something DigitalOcean has been doing to reduce spam on their network. Please do not think that they are accusing you of sending spam, it is more that they 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. To qualify for the ability to send out emails, DigitalOcean requires accounts to wait 60 days before they can look into removing the restriction. Once your account has reached 60 days of stable use, please do reach back out to the DigitalOcean support team so they can look into this for you.

In the meantime, you could use port 587 instead.

Hope that helps! Regards, Bobby

We have forward and reverse DNS setup correctly, however postfix still has issues sending to Gmail and outlook. Does anyone have SMTP Relay service recommendations? Does digitalocean have smtp relay?

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