SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?

Prerequisites

You must be in the possession of your smtp parameters. The best way is to use the smtp of your ISP because you will then have access to a SSL connection, and with it, the possibility to send an email everywhere you are.

We are going to try to connect to the Smtp server with this credential :

  • smtp server : smtp.xs4all.nl
  • port : unsecure 25 or secure TLS : 587
  • Login : login
  • Password : password
  • Sender : nicolas.gerard@newfrontiers.com

If you search a free stmp service, the site Gmx.com is reported as offered a free smtp server which work without STARTTLS or the need to upgrade to a professionnal account as for instance Google and Yahoo ask for. (To know more about the test on Yahoo and Google, see the Google and Yahoo section)

  • smtp server : mail.gmx.com
  • port : 25

Before we continue with the process, if we use a secure SMTP, we need to encode our credential in a base64 encoding. You can perform a search on Google to find an encoder or you can go on this one :

Enter the login and click on the encode button, copy the result and do the same for the password. We retrieve then this values :

  • Login : bG9naW4=
  • Password : cGFzc3dvcmQ=

Article related

Port Used by Smtp Service

The following ports can be used in a smtp service :

Service Port Service
smtps 465/tcp #smtp protocol over TLS (was ssmtp)
submission 587/tcp Submission for Simple Mail Transfer

Telnet

Below, you can find all the command that you must tape in the telnet windows.

If you don't use a SSL smtp, you can ommit the lines :

AUTH LOGIN
bG9naW4=                       <-- login
cGFzc3dvcmQ=                   <-- password

ehlo nico
AUTH LOGIN
bG9naW4=                       <-- login
cGFzc3dvcmQ=                   <-- password
MAIL FROM: nicolas.gerard@newfrontiers.com
RCPT TO: gerardnico@gmail.com
DATA
This a big big test
.
QUIT

The Smtp Server will always respond with a message.

If you do a mistake when you tape a command and then you go back to correct it, you will have in anyway an error message.

QUIT
500 5.5.1 Command unrecognized: "QUIT"

This message is not true, the command QUIT exist but if you have done a mistake as for instance if you have written QUIY, you correct it and you valid, you will have this error.

Open a command dos and launch telnet for the smtp server smtp.xs4all.nl on the port 587

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
 
C:\Documents and Settings\Nicolas>telnet smtp.xs4all.nl 587

The server smtp must answer :

220 smtp-vbr15.xs4all.nl ESMTP Sendmail 8.13.8/8.13.8; Sun, 26 Apr 2009 14:17:28 +0200 (CEST)

And you can begin to talk :

ehlo nico
250-smtp-vbr15.xs4all.nl Hello 5353DF77.cable.casema.nl [83.83.223.119], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 31457280
250-DSN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
bG9naW4=
334 UGFzc3dvcmQ6
cGFzc3dvcmQ=
235 2.0.0 OK Authenticated
MAIL FROM: nicolas.gerard@newfrontiers.com
250 2.1.0 nicolas.gerard@newfrontiers.com... Sender ok
RCPT TO: gerardnico@gmail.com
250 2.1.5 gerardnico@gmail.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
This a big big test
.
250 2.0.0 smtp-vbr15.xs4all.nl accepted message n3QCHS17026035
QUIT
221 2.0.0 smtp-vbr15.xs4all.nl closing connection
 
Connection to host lost.

The result

Support

Smtp Error

You have an error code, see this article to find the meaning :

With Google / STARTTLS

Basic telnet does not support SSL or TLS. You have to use openssl or stunnel to verify your smtp parameters.

C:\Documents and Settings\Nicolas>telnet smtp.gmail.com 587
220 mx.google.com ESMTP 10sm8014744eyd.42
ehlo nico
250-mx.google.com at your service, [83.83.223.119]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 PIPELINING
AUTH LOGIN
530 5.7.0 Must issue a STARTTLS command first. 10sm8014744eyd.42
STARTTLS
220 2.0.0 Ready to start TLS
EHLO NICO
 
 
Connection to host lost.
C:\Documents and Settings\Nicolas>

With Yahoo

C:\Documents and Settings\Administrateur>telnet plus.smtp.mail.yahoo.com 587
220 smtp107.prem.mail.ac4.yahoo.com ESMTP
ehlo nico
250-smtp107.prem.mail.ac4.yahoo.com
250-AUTH LOGIN PLAIN XYMCOOKIE
250-PIPELINING
250 8BITMIME
AUTH LOGIN
334 VXNlcm5hbWU6
Z2VyYXJkbmljb0Byb2NrZXRtYWlsLmNvbQ==
334 UGFzc3dvcmQ6
ZmFrZXBhc3N3b3Jk
530 Access denied : Free users are not supported on this server.

Reference : POP Yahoo! Mail Plus with Microsoft Outlook Express

  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at del.icio.us
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Digg
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Ask
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Google
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at StumbleUpon
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Technorati
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Live Bookmarks
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Yahoo! Myweb
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Facebook
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Yahoo! Bookmarks
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at Twitter
  • Bookmark "SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?" at myAOL
 
smtp_telnet.txt · Last modified: 2010/05/05 19:48 by gerardnico