I've recently installed Ubuntu Server 9.10 on a machine that's, among other things, supposed to serve as an outgoing (only outgoing) mail server. I don't want to use Smart Host since my organization does not have any other SMTP server it can use. Furthermore, we're using Google Apps as our email service, which requires SMTP authentication if we want to use it as the SMTP server.

To make a long story short, I've installed Postfix using this tutorial and currently I'm able to send mail to my private, ISP-based email address but not to GMail-based (private GMail or the oprganization's Apps mail) accounts.

When invoking a call to mailq, I'm getting a 'connection timeout' message. This is the content of the mail log file for a single message:

Dec  1 12:44:34 albert postfix/pickup[18833]: CB92758079A: uid=1000 from=<shai>
Dec  1 12:44:34 albert postfix/cleanup[18839]: CB92758079A: message-id=<20091201104434.CB92758079A@localhost.localdomain>
Dec  1 12:44:34 albert postfix/qmgr[18834]: CB92758079A: from=<shai@my-org.com>, size=323, nrcpt=1 (queue active)
Dec  1 12:45:05 albert postfix/smtp[18841]: connect to gmail-smtp-in.l.google.com[]:25: Connection timed out
Dec  1 12:45:35 albert postfix/smtp[18841]: connect to alt1.gmail-smtp-in.l.google.com[]:25: Connection timed out
Dec  1 12:46:05 albert postfix/smtp[18841]: connect to alt2.gmail-smtp-in.l.google.com[]:25: Connection timed out
Dec  1 12:46:35 albert postfix/smtp[18841]: connect to alt3.gmail-smtp-in.l.google.com[]:25: Connection timed out
Dec  1 12:47:05 albert postfix/smtp[18841]: connect to alt4.gmail-smtp-in.l.google.com[]:25: Connection timed out
Dec  1 12:47:05 albert postfix/smtp[18841]: CB92758079A: to=<some.account@gmail.com>, relay=none, delay=151, delays=0.16/0.01/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[]:25: Connection timed out)

I should note that when configuring Postfix according to the said tutorial, there was no smtpd.conf file at /etc/postfix/sasl/smtpd.conf so I had to create it.

Hope this is not too much of a noob question - I'm not that familiar with the whole mail / SMTP area.




Can you telnet to port 25 of any of the Google MX servers (or any smtp server at all)? This will help pin down if it's a network issue or a mail system issue.

For me, I get this valid response:

user@host:~$ telnet gmail-smtp-in.l.google.com 25
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP 3si95666ewy.62

If you can't get a connection anywhere I'd suggest checking local firewall rules.

CORRECTION: The fact you mention it works for other address would suggest it's not a local firewall restriction. Often if a mail server believes you to be a spamming it will just drop the connection before giving you a chance to send any data, so I'd still try the telnet test.

  • It finally hit me that the reason that I could telnet to my ISP's own SMTP server and not to GMail is that my ISP blocks SMTP traffic to any host other than their own! Doh! – Electric Monk Dec 1 '09 at 13:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.