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=<[email protected]>
Dec 1 12:44:34 albert postfix/qmgr[18834]: CB92758079A: from=<[email protected]>, size=323, nrcpt=1 (queue active)
Dec 1 12:45:05 albert postfix/smtp[18841]: connect to gmail-smtp-in.l.google.com[209.85.135.114]:25: Connection timed out
Dec 1 12:45:35 albert postfix/smtp[18841]: connect to alt1.gmail-smtp-in.l.google.com[209.85.216.94]:25: Connection timed out
Dec 1 12:46:05 albert postfix/smtp[18841]: connect to alt2.gmail-smtp-in.l.google.com[209.85.211.21]:25: Connection timed out
Dec 1 12:46:35 albert postfix/smtp[18841]: connect to alt3.gmail-smtp-in.l.google.com[209.85.221.47]:25: Connection timed out
Dec 1 12:47:05 albert postfix/smtp[18841]: connect to alt4.gmail-smtp-in.l.google.com[74.125.79.114]:25: Connection timed out
Dec 1 12:47:05 albert postfix/smtp[18841]: CB92758079A: to=<[email protected]>, 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[74.125.79.114]: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.
Thanks
Shai
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:
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.