Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Connection timed out

47 views
Skip to first unread message

Daniel Watrous

unread,
Feb 19, 2015, 9:49:53 AM2/19/15
to
Hi,

I am running an Ubuntu server inside virtualbox on Windows (created using Vagrant). The server is configured to run a LEMP stack and I would like the mail function in PHP to work, so I installed postfix.

Unfortunately it won't send any email. Here's the command line I ran to send a test email.

vagrant@vagrant-ubuntu-trusty-64:~$ echo "This is the body of the email" | mail -s "This is the subject line" myema...@gmail.com

Here are the logs:
Feb 19 14:41:09 vagrant-ubuntu-trusty-64 postfix/pickup[10527]: BE65C408C6: uid=1000 from=<vagrant@vagrant-ubuntu-trusty-64>
Feb 19 14:41:09 vagrant-ubuntu-trusty-64 postfix/cleanup[10904]: BE65C408C6: message-id=<20150219144109.BE65C408C6@vagrant-ubuntu-trusty-64>
Feb 19 14:41:09 vagrant-ubuntu-trusty-64 postfix/qmgr[10528]: BE65C408C6: from=<vagrant@vagrant-ubuntu-trusty-64>, size=409, nrcpt=1 (queue active)
Feb 19 14:41:39 vagrant-ubuntu-trusty-64 postfix/smtp[10906]: connect to gmail.com[74.125.21.19]:25: Connection timed out
Feb 19 14:42:09 vagrant-ubuntu-trusty-64 postfix/smtp[10906]: connect to gmail.com[74.125.21.17]:25: Connection timed out
Feb 19 14:42:39 vagrant-ubuntu-trusty-64 postfix/smtp[10906]: connect to gmail.com[74.125.21.83]:25: Connection timed out
Feb 19 14:43:09 vagrant-ubuntu-trusty-64 postfix/smtp[10906]: connect to gmail.com[74.125.21.18]:25: Connection timed out
Feb 19 14:43:09 vagrant-ubuntu-trusty-64 postfix/smtp[10906]: BE65C408C6: to=<myema...@gmail.com>, relay=none, delay=120, delays=0.01/0/120/0, dsn=4.4.1, status=deferred (connect to gmail.com[74.125.21.18]:25: Connection timed out)

I have found a lot of people with the same issue, but none of the solutions mentioned have helped. I would appreciate any assistance you can offer.

Daniel Watrous

unread,
Feb 19, 2015, 8:30:05 PM2/19/15
to
I'm pretty sure the culprit here is Comcast, blocking port 25.

I ended up using ssmtp with a throwaway gmail account.

Burkhard Ott

unread,
Feb 19, 2015, 9:21:58 PM2/19/15
to
On Thu, 19 Feb 2015 17:30:02 -0800, Daniel Watrous wrote:

> I'm pretty sure the culprit here is Comcast, blocking port 25.
>
> I ended up using ssmtp with a throwaway gmail account.

Yup, but you should better leave comcast, unless you are happy to pay the
full fee for half the service.

cheers

alex....@gravitant.com

unread,
Feb 23, 2015, 10:29:08 AM2/23/15
to
See if Comcast offers you a SMTP Smarthost relay to send out. Often, there are limitations such as only sending for specific FROM domains (if they offer their own). Maybe a call to their support (may your sanity be saved!) will get the block lifted, but it's not likely.

Also, GMail does some fairly rigorous checks for spam, so you should at the least make sure that your FROM domain is legit (vagrant-ubuntu-trusty-64 is not), and that the domain's SPF record allows you to send out.

If you would like reliable mail, you may want to use Google's authenticated SMTP server as describe here:
https://www.digitalocean.com/community/tutorials/how-to-use-google-s-smtp-server

Postfix support using SMTP auth. I've had good luck with this guide (it's for Amazon's SES service, but the config is the same, just change the server hostname to be Google's):
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html


Good luck!
0 new messages