Configure Postfix to use SendGrid as outgoing emails

I’m trying to configure Postfix on my droplet to use SendGrid for my outgoing emails, but it keeps giving me a timeout error to connect with SendGrid server.

The error message is: localhost postfix/smtp[8705]: 0A2F71E2979: relay=none, delay=1478, delays=1418/0.02/60/0, dsn=4.4.1, status=deferred (connect to[]:587: Connection timed out)

Can anyone please help me?

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 Gabriel, <br> <br>In order to get to the bottom of this, we could use some more information. Could you post you Postfix config: /etc/postfix/ <br> <br>Also any additional error messages in the log file (/var/log/mail.log) could be helpful.