Testing SMTP/POP3/IMAP connections manually:
Telnet to desired port # and use the following dialogs:
POP3:
USER <username><enter>
PASS <password><enter>
IMAP:
asdf LOGIN <username> <password><enter>
(note that "asdf" could be any "command id" .. like 1234 or 0001)
SMTP:
HELO <your.ip.goes.here (or yourdomain.com)>
MAIL FROM: <you@yourdomain.com>
RCPT TO: <them (or them@theirdomain.com)>
DATA
Subject: <some subject>
<Other headers like "Reply-to: you@anotherdomain.com">
<Some message text...>
.
(be sure to end with a single period on a line by itself)
Here is an actual IMAP exchange for header retrieval:
[testuser@testserver testuser]$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4 IMAP4REV1 STARTTLS LOGIN-REFERRALS AUTH=LOGIN] localhost
IMAP4rev1 2000.287rh at Sun, 13 Jan 2002 10:25:27 -0700 (MST)
0000 CAPABILITY
* CAPABILITY IMAP4 IMAP4REV1 STARTTLS NAMESPACE IDLE MAILBOX-REFERRALS SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND LOGIN-REFERRALS AUTH=LOGIN
0000 OK CAPABILITY completed
0001 LOGIN testuser testpassword
* CAPABILITY IMAP4 IMAP4REV1 STARTTLS NAMESPACE IDLE MAILBOX-REFERRALS SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND
0001 OK LOGIN completed
0002 SELECT "INBOX"
* 1959 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1010434677] UID validity status
* OK [UIDNEXT 6929] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
* OK [UNSEEN 1938] first unseen message in /var/spool/mail/testuser
0002 OK [READ-WRITE] SELECT completed
0003 UID FETCH 6928:* (BODY.PEEK[HEADER.FIELDS (References X-Ref X-Priority X-MS
Mail-Priority X-MSOESRec Newsgroups)] ENVELOPE RFC822.SIZE UID FLAGS INTERNALDATE)
* 1959 FETCH (UID 6927 BODY[HEADER.FIELDS ("REFERENCES" "X-REF" "X-PRIORITY" "X-MSMAIL-PRIORITY" "X-MSOESREC" "NEWSGROUPS")] {44}X-Priority: 3
X-MSMail-Priority: Normal
ENVELOPE ("Sun, 13 Jan 2002 02:52:44 -0700" "Testing" (("Test Sender" NIL "testsender" "hotmail.com")) (("Test Sender" NIL "testsender" "hotmail.com")) (("Test Sender" NIL "testsender" "hotmail.com")) ((NIL NIL "testuser" "testdomain.com")) NIL NIL NIL "<009501c19c18$0d237420$6523a8c0@TEST>") RFC822.SIZE 114699 FLAGS (\Seen) INTERNALDATE "13-Jan-2002 02:56:50 -0700")
0003 OK UID FETCH completed
0004 UID FETCH 1:6927 (UID FLAGS)
# the next section has been truncated for simplicity.. the real output contained all of the message ids (UID) from 1-6927 and their status flags, numbered from 1 to messagecount on the left (28th and 29th messages shown)
...
* 28 FETCH (UID 62 FLAGS (\Seen))
* 29 FETCH (UID 63 FLAGS (\Seen \Answered))
...
0005 LOGOUT
* BYE testserver.testdomain.com IMAP4rev1 server terminating connection
0005 OK LOGOUT completed
Connection closed by foreign host.