Emails on Send-only mail server not sending

I've been trying to setup my own send-only mail server so I could send emails using PHP scripts, but I've been running into some issues. Whenever I send a test email to my gmail account, it doesn't go thorugh and I get the following errors in the mail.log file:

Apr 9 06:17:55 driedsponge postfix/smtp[28482]: connect to alt1.gmail-smtp-in.l.google.com[74.125.129.27]:25: Connection timed out
Apr 9 06:18:25 driedsponge postfix/smtp[28482]: connect to alt2.gmail-smtp-in.l.google.com[142.250.11.27]:25: Connection timed out
Apr 9 06:18:55 driedsponge postfix/smtp[28482]: connect to alt3.gmail-smtp-in.l.google.com[173.194.77.27]:25: Connection timed out
Apr 9 06:19:25 driedsponge postfix/smtp[28482]: connect to alt4.gmail-smtp-in.l.google.com[64.233.177.27]:25: Connection timed out
Apr 9 06:19:25 driedsponge postfix/smtp[28482]: 57B4E26099E: to=<>, relay=none, delay=1985, delays=1835/0.04/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[64.233.177.27]:25: Connection timed out)

I figured it was because my ISP was probably blocking port 25, so I changed it in the master.cf file to port 587 to see if it would work, but it didn't. The only time I was actually able to send an email was when I used Gmail SMTP. I would just use the Gmail SMTP server, but it prevents me from using my own domain.

Any help would be much appreciated! Thank you!

Here are the tutorials I followed:

Configure Postfix to Use Gmail SMTP on Ubuntu

How to Install and Configure Postfix as a Send-Only SMTP Server on Ubuntu 16.04

(I don't use a hosting provider, I just host off a machine I own)

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like