Validate Mail Connections with Telnet
Validating a non-SSL POP server connection
telnet host port
user user
pass pass
LOGIN TEST:
andy@sup-jira2:/usr/local/apps/home/log$ telnet x.y.com 110
Trying 1.2.3.4...
Connected to x.y.com.
Escape character is '^]'.
+OK Dovecot (Ubuntu) ready.
user MAILUSER
+OK
pass MAILPASS
+OK Logged in.
LIST MESSAGES (after login):
Use LIST to list the messages, and then RETR (RETR 1) to view the given message
LIST
+OK 2 messages:
1 437
2 2408
.
RETR 1
+OK 437 octets
Return-Path: <root@localhost>
X-Original-To: andy@localhost
Delivered-To: andy@localhost
Received: by isoserver (Postfix, from userid 0)
id C09044061F; Tue, 2 Dec 2014 13:15:11 +0000 (GMT)
Subject: Test
To: <andy@localhost>
X-Mailer: mail (GNU Mailutils 2.99.98)
Message-Id: <20141202131511.C09044061F@localhost>
Date: Tue, 2 Dec 2014 13:15:11 +0000 (GMT)
From: root@localhost (root)
Hi there
quick test
DELETE A mail
DELE 1
+OK Marked to be deleted.
QUITTING:
As we're using telnet, you can use CTRL + ] to close the connection, the mail server may also support quit
Validating Plain SMTP
- http://www.yuki-onna.co.uk/email/smtp.html
Validating SMTP with TLS
Its also possible to do telnet style interaction with a TLS secured server (this example shows that there is a server side block on the account I am logging in as)
Authenticating for SMTP
Once a session has been setup as above, authentication can occur with: auth login. What happens next is a 334 code response is sent by the server, what's wanted now is a base64 encoded value of the username (AAAAAAAAAAAAAA==), JEMHC has a Base64 Encoder in the Tools section. After hitting enter, a further 334 code response is sent, next it wants the password, also base64 encoded. If that worked, you're now authenticated. If not, check Common Problems.
Related articles