Testing email - various ways

From The Network People, Inc. - Wiki
Jump to navigation Jump to search

Testing IMAP via telnet
Testing SMTP via telnet
Testing POP3 via telnet

The links above provide much more detail than my "cheat sheet."

MAIL Server testing

SMTP

[localhost:~] matt% telnet mail.example.com smtp
Trying 64.224.19.12...
Connected to mail.example.com.
Escape character is '^ ]'.
220 mail.example.com ESMTP
ehlo
250-mail.example.com
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-PIPELINING
250-STARTTLS
250 8BITMIME
mail from:me@mydomain.com
250 ok
rcpt to:you@example.com
250 ok
data
354 go ahead
To:Your Name<you@example.com>
From: My Name<me@mydomain.com>
Subject: email test

This is the message body. It ends with a single . on a blank line.
.
250 ok 1016471746 qp 9246

While this still works, I don't use it very often. Not since I discovered swaks.

POP3

telnet pop.domain.com pop3
+OK Hello there.
user user@example.net
+OK Password required.
pass secret
+OK
list
1 1586
2 13304
3 795
.
dele 2
+OK
quit
Connection closed by foreign host.

IMAP

telnet imap.example.com imap
Escape character is '^ ]'.
* OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc. See COPYING for distribution information.
. login user@example.com secret
. OK LOGIN Ok.
A0001 CAPABILITY
* CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA
. logout
* BYE Courier-IMAP server shutting down
. OK LOGOUT completed