Claim your Biolink Click Here
1 like 0 dislike
887 views
in Computers & Internet by | 887 views

2 Answers

0 like 0 dislike

1. Telnet into Exchange server TCP port 25.
Command is telnet <servername> 25

OR

telnet <servername> smtp

2. Issue the following smtp command sequence

helo <your domain name><enter>                  
response should be as follows
250 OK

mail from: <your Email Address><enter>
response should be as follows
250 OK - mail from <your Email address>

rcpt to: <recipient address><enter>
response should be as follows
250 OK - Recipient <recipient address>

data<enter>
response should be as follows
354 Send data.  End with CRLF.CRLF

To: <recipient's display name><enter>
From: <your display name><enter>
Subject: <Subject field of Email message><enter>
<Enter you body text>
press ENTER, type a period (.), and then press ENTER again.
response should be as follows
250 OK

If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:

 
250 2.6.0 <INET-IMC-01UWr81nn9000fbad8@mail1.gmail.com. Queued mail for delivery

quit<enter>

by
0 like 0 dislike

How to Test SMTP AUTH using Telnet

Below are instructions on how to test SMTP AUTH against a mail server using Telnet and entering the commands by hand.

The first thing you need to do is get a base64 encoding of your username and password. There are a couple ways to do this, the example below uses Perl:

 

 
perl -MMIME::Base64 -e 'print encode_base64("username");'
perl -MMIME::Base64 -e 'print encode_base64("password");'

 

What will be returned from each command is a base64 encoding of the username and password; save these as you will need them later. Now connect to the mail server using Telnet:

 

 
telnet mailserver.com 25

 

Greet the mail server:

 

 
EHLO mailserver.com

 

Tell the server you want to authenticate with it:

 

 
AUTH LOGIN

 

The server should have returned 334 VXNlcm5hbWU6; this is a base64 encoded string asking you for your username, paste the base64 encoded username you created earlier, example:

 

 
dXNlcm5hbWUuY29t

 

Now the server should have returned 334 UGFzc3dvcmQ6;. Again this is a base64 encoded string now asking for your password, paste the base64 encoded password you created, example:

 

 
bXlwYXNzd29yZA==

 

Now you should have received a message telling you that you successfully authenticated. If it failed your user/pass may have been wrong or your mailserver is broken.

Below is a log of a real successful SMTP AUTH connection over Telnet:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
user@localhost [~]# telnet exampledomain.com 25
Trying 1.1.1.1...
Connected to exampledomain.com (1.1.1.1).
Escape character is '^]'.
220-server1.exampledomain.com ESMTP Exim 4.66 #1 Wed, 09 May 2007 23:55:12 +0200
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
EHLO exampledomain.com
250-server1.exampledomain.com Hello  [1.1.1.2]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN
2
by

Related questions

1 like 0 dislike
1 answer
asked Apr 15, 2014 in Education & Reference by Yogi (460 points) | 288 views
0 like 0 dislike
1 answer
2 like 0 dislike
1 answer
asked Oct 7, 2013 in Education & Reference by Krish (1.1k points) | 720 views
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,312 questions
1,473 answers
569 comments
4,809 users