Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey all i am try to connect to gmail and hotmail server via telnet.


$: telnet 25
Connected to
Escape character is '^]'.
220 ESMTP j3sm3044317ybe.11
250 at your service
220 2.0.0 Ready to start TLS
mail from:
Connection closed by foreign host.

Here codeomnitrix is a user of And i am running postfix at my system with sitename being

And i am able to sent mail locally from one user to another user but can't send to any other user who is not local.

Thanks in advance:)

share|improve this question
If I'm not mistaken, Gmail is exclusively SSL now, so 25 won't work. – user3914 Feb 21 '11 at 5:04
Any relevant postfix log records? – Khaled Feb 21 '11 at 5:10
The sample you've posted here proves de facto that you are able to connect. – symcbean Feb 21 '11 at 12:44

The reason telnet isn't working is because Google is now requiring ESMTP (EHLO verb, not HELO) and TLS. Telnet is now broken. You can use openssl, though.

openssl s_client -starttls smtp -crlf -connect

The normal SMTP commands should work from there.

share|improve this answer
kk thanks sysadmin1138. but what do you think about hotmail as it says that you r not having static ip address. so how to tackle that one. Thanks :) – codeomnitrix Feb 22 '11 at 5:19
@codeomnitrix That's a different issue entirely. For that you'll have to test from somewhere not on the Big List of Dynamic IP Addresses. – sysadmin1138 Feb 22 '11 at 5:24
Ok Thanks :) – codeomnitrix Feb 22 '11 at 5:27

Why are you trying to connect to The MX for domains using google apps is and the MX for is Are you trying to use Gmail as a mail relay for your computer, or trying to deliver to a Google Apps mail/ account? does not require STARTTLS like does, as it's an MX, not a mail submission point.

Also - what you pasted is invalid SMTP. You need angle brackets around the e-mail address in a MAIL FROM. Some SMTP servers might accept it, but Gmail won't.

$ telnet 25
Connected to
Escape character is '^]'.
220 ESMTP v8si11328246ybe.52
250 at your service
mail from:
555 5.5.2 Syntax error. v8si11328246ybe.52
250 2.1.0 OK v8si11328246ybe.52
share|improve this answer
hey thanks akramer i will try that one. – codeomnitrix Feb 22 '11 at 5:21
Hey akramer till mail from its ok but when i typed : rcpt to:<> it gives some syntax error. here i am using my gmail account which is the destination of the email. – codeomnitrix Feb 22 '11 at 5:39

@codeomnitrix, please try to type the command in capital letters i.e :

share|improve this answer

Your Answer


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.