How to manually test SMTP Authentication
Written by Shai Ben-Naphtali Saturday, 19 December 2009
- Base64 encoder
- How to Use Telnet to Test SMTP Communication
- GRC’s Ultra High Security Password Generator
- The PC Tools Password Generator
Sometimes, you find yourself not knowing if you have the right credentials to do SMTP Authentication. This might be because your mail client that you are so used to, is just a GUI (Graphic User Interface) for doing things the easy way. In this blog, I’ll show you (a bit of) what your mail client does in order to authenticate and send an email via an SMTP server/service.
This guide, with just using telnet, will allow you to test if you can even do SMTP on port 25 from within your LAN/Organization or behind your Anti-Virus/Firewall.
First, you need to get your username/email address and your password, encoded into a base64 data encoding scheme  or use perl (as I’ll show below).
- Use the web based encoder  to encode your username/email address and your password.
- shai@ubuntu:~$ perl -MMIME::Base64 -e ‘print encode_base64(“shai\@shai-arvixe.com”);’
(Note: Notice how I had to escape the @ sign with a backslash)
- shai@ubuntu:~$ perl -MMIME::Base64 -e ‘print encode_base64(“n<5%jm>n~9kcV7iF/H\“^GpHghs05~wxMJ<&,Ifc93v.}_2bQ>RePq^qr=Ss),)f”);’
(Note: Notice how I had to escape the “ sign with a backslash)
Now you can use telnet on your Windows/Linux box to test the SMTP Authentication:
(In Orange is text I typed)
- shai@ubuntu:~$ telnet test.arvixe.com 25
Connected to test.arvixe.com.
Escape character is ‘^]’.
220-test.arvixe.com ESMTP Exim
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
250-test.arvixe.com Hello l192-168-1-199.cable.internal.net [192.168.1.199]
250-AUTH PLAIN LOGIN
235 Authentication succeeded
MAIL FROM: [email protected]
RCPT TO: [email protected]
354 Enter message, ending with “.” on a line by itself
From: Shai’s blog <[email protected]>
Subject: testing 0940
This is another test.
250 OK id=1NLtun-0005EK-6i
- Well, what do you know, it arrived