F5F Stay Refreshed Software Operating Systems Problem with Postfix sending emails only to the mail server.

Problem with Postfix sending emails only to the mail server.

Problem with Postfix sending emails only to the mail server.

B
bymek606
Junior Member
24
03-13-2023, 08:42 AM
#1
Hello, I'm working on setting up my own send-only mail server to send emails via PHP scripts. I've encountered some problems and see these errors in the log file when sending test messages to my Gmail account. The logs show repeated connection timeouts to various Gmail SMTP servers, especially alt4.gmail-smtp-in.l.google.com. I tried switching to port 587 in the master.cf file, but it didn't resolve the issue. I'm also using Gmail's SMTP server for testing, which blocks my domain. The tutorials I followed suggest using Postfix with Gmail SMTP on Ubuntu, but I'm not sure if that's the right path. Any advice would be greatly appreciated! Thank you.
B
bymek606
03-13-2023, 08:42 AM #1

Hello, I'm working on setting up my own send-only mail server to send emails via PHP scripts. I've encountered some problems and see these errors in the log file when sending test messages to my Gmail account. The logs show repeated connection timeouts to various Gmail SMTP servers, especially alt4.gmail-smtp-in.l.google.com. I tried switching to port 587 in the master.cf file, but it didn't resolve the issue. I'm also using Gmail's SMTP server for testing, which blocks my domain. The tutorials I followed suggest using Postfix with Gmail SMTP on Ubuntu, but I'm not sure if that's the right path. Any advice would be greatly appreciated! Thank you.

H
hannah663
Member
169
03-13-2023, 05:02 PM
#2
The ISP likely blocks incoming port 25, not outgoing, indicating a possible misconfiguration. You should still be able to send emails via Gmail as a relay host. From the logs, it appears Gmail is set up to route messages through port 25.
H
hannah663
03-13-2023, 05:02 PM #2

The ISP likely blocks incoming port 25, not outgoing, indicating a possible misconfiguration. You should still be able to send emails via Gmail as a relay host. From the logs, it appears Gmail is set up to route messages through port 25.

D
DrCrazyBoy
Junior Member
17
03-13-2023, 08:36 PM
#3
I can continue sending emails through the Gmail relay host, but without it I can't. I'm curious if it's possible to switch port 25 to port 587.
D
DrCrazyBoy
03-13-2023, 08:36 PM #3

I can continue sending emails through the Gmail relay host, but without it I can't. I'm curious if it's possible to switch port 25 to port 587.

S
stuff
Member
173
03-14-2023, 12:47 PM
#4
It seems the PTR lookup on your IP isn't working properly. Most mail servers require reverse name checks to match forward names. You're likely being identified as your ISP, which will cause SPF verification failures and prevent the mail server from accepting your messages. The issue is resolved when using Google's relay, as it appears the account is coming from Gmail. Check what error message appears when you try to connect directly to the MX host for the email address you're sending. Consider using telnet or a similar tool like telnet mail.someplace.com 25 HELO <your hostname here> to test connectivity.
S
stuff
03-14-2023, 12:47 PM #4

It seems the PTR lookup on your IP isn't working properly. Most mail servers require reverse name checks to match forward names. You're likely being identified as your ISP, which will cause SPF verification failures and prevent the mail server from accepting your messages. The issue is resolved when using Google's relay, as it appears the account is coming from Gmail. Check what error message appears when you try to connect directly to the MX host for the email address you're sending. Consider using telnet or a similar tool like telnet mail.someplace.com 25 HELO <your hostname here> to test connectivity.