Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to setup a mail server (postfix & dovecot) on Ubuntu. However, I cannot send/receive email, and get a similar error like posted in Postfix: lost connection with *somehost* while receiving the initial server greeting. My error message looks like:

Jan  5 03:46:49 oakwise-12752 postfix/smtp[22531]: 48079C08F4: conversation with gmail-smtp-in.l.google.com[74.125.25.27] timed out while receiving the initial server greeting

When I try to telnet to the google mail server, I can connect to the host, but don't get greeting message (220). Like this:

$ telnet gmail-smtp-in.l.google.com 25
Trying 74.125.25.27...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.

When I try to telnet to my own mail server, I can get the greeting message successfully.

$ telnet localhost 25
Trying 127.0.0.1...
Connected to myhost.mydomain.com
Escape character is '^]'.
220 myhost.mydomain.com ESMTP Postfix (Ubuntu)

Do you know if there is any problem with my hosts configuration? Please tell me if you need any further information.

UPDATE

Here is some result for tcpdump while telnet gmail-smtp-in.l.google.com 25 .

tcpdump host 74.125.25.26
09:20:39.856647 IP myhost.mydomain.com.53742 > fa-in-f26.1e100.net.smtp: Flags [S], seq 2040695833, win 14600, options [mss 1460,sackOK,TS val 274530380 ecr 0,nop,wscale 7], length 0
09:20:40.013693 IP fa-in-f26.1e100.net.smtp > myhost.mydomain.com.53742: Flags [S.], seq 1029741075, ack 2040695834, win 14180, options [mss 1430,sackOK,TS val 128311508 ecr 274530380,nop,wscale 6], length 0
09:20:40.013747 IP myhost.mydomain.com.53742 > fa-in-f26.1e100.net.smtp: Flags [.], ack 1, win 115, options [nop,nop,TS val 274530420 ecr 128311508], length 0
09:20:51.837739 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 1931780617:1931780622, ack 3676242651, win 115, options [nop,nop,TS val 274533376 ecr 3949456046], length 5
09:22:52.157741 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274563456 ecr 3949456046], length 5
09:24:52.477713 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274593536 ecr 3949456046], length 5
09:26:52.797732 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274623616 ecr 3949456046], length 5
09:28:53.117719 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274653696 ecr 3949456046], length 5
09:30:53.437729 IP myhost.mydomain.com.53727 > fa-in-f26.1e100.net.smtp: Flags [P.], seq 0:5, ack 1, win 115, options [nop,nop,TS val 274683776 ecr 3949456046], length 5

UPDATE 2

Google tells me that logs of ISP will block port 25 to prevent email spam. I am using a virtual host provided by my company cloud. Is this possible that port 25 is blocked by company's firewall or ISP? How can I figure out if it is blocked?

share|improve this question
    
There's a related question, but with no clear resolution. –  David Schwartz Jan 5 '13 at 10:15
    
@DavidSchwartz Thanks. I mentioned that question in this one's description as well. In the comment thread of the accepted answer for that question, it is mentioned that "I was able to telnet 74.125.39.27 25 and send a message to myself..". My different situation is that I cannot "telnet remote.mail.server 25" and get greeting message. –  imapollo Jan 5 '13 at 13:08

2 Answers 2

It could be anti-spam techniques used by google. Are other smtp servers behave similar to google-mx? May be tcpdump gets some clues

share|improve this answer
    
I am updating the tcpdump result to the question description. –  imapollo Jan 6 '13 at 2:21

I agree that it is likely to be anti-spam techniques used by google :

Here's the telnet output from another IP :


> telnet gmail-smtp-in.l.google.com 25
Trying 173.194.70.26...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP j49si145368071eep.45
quit
221 2.0.0 closing connection j49si145368071eep.45
Connection closed by foreign host.

And the same telnet for the ip you mention :


> telnet 74.125.39.27 25
Trying 74.125.39.27...
telnet: connect to address 74.125.39.27: Operation timed out
telnet: Unable to connect to remote host
share|improve this answer
    
I tried the IP which is good for you, "telnet 173.194.70.26 25", but still don't get greeting message. And what I tried is 74.125.25.27 :) –  imapollo Jan 6 '13 at 1:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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