2

I want the server able to send mail via gmail smtp. The installation of msmtp was successful. I able to send using msmtp via the command line. However, when I try to send via php, it got me this error.

postfix/smtp[11241]: connect to gmail-smtp-in.l.google.com[74.125.200.27]:25: Connection timed out

postfix/smtp[11241]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c00::1b]:25: Network is unreachable connect to alt2.gmail-smtp-in.l.google.com[74.125.25.26]:25: Connection timed out

postfix/smtp[11241]: 8F4DB10D10: to=, relay=none, delay=1086, delays=993/0.13/93/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.25.26]:25: Connection timed out)

I had change the postfix config file

inet_interfaces = localhost 

to

inet_interfaces = all 

But still no avail

Any idea why?

By the way, I am using Centos with LEMP stack.

1
  • Who is your service provider? Commented Oct 15, 2015 at 20:34

2 Answers 2

1

I found the problem, turn out is the msmtp config file permission issue. I change it to the proper user and group, and it works now.

0

If you are sending email from gmail, meaning your gmail account & clearly using postfix you'll need sasl auth and use Google's smtp connection on port 587... Postfix-Gmail guide

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.