Using Telnet to connect to Exchange 2003 POP3 mailboxes and using SMTP to send e-mail for troubleshooting purposes

Telnet to Exchange 2003 POP3 mailboxes and using SMTP to send e-mail for troubleshooting purposes

In this article I will give you tips for troubleshooting Exchange 2003 POP3 access and SMTP E-Mail transfer using the good old Telnet client. Why am I writing an article about POP3 and SMTP troubleshooting with the help of Telnet? Telnet gives you some powerful information about every connection step for POP3 or SMTP processes.

Some basic information about POP3 and SMTP

POP3

Short for Post Office Protocol, a protocol used to retrieve e-mail from a mail server. Most e-mail applications (sometimes called an e-mail client) use the POP protocol, although some can use the newer IMAP (Internet Message Access Protocol).

There are two versions of POP. The first, called POP2, became a standard in the mid-80′s and requires SMTP to send messages. The newer version, POP3, can be used with or without SMTP.

Source: Here

Beginning with Exchange 2003 we have to activate POP3 support after the Exchange installation, because Microsoft has disabled some services for security reasons (POP3 communication is unencrypted per Default – but you can use TLS to ensure security).

SMTP

Short for Simple Mail Transfer Protocol, a protocol for sending e-mail messages between servers. Most e-mail systems that send mail over the Internet use SMTP to send messages from one server to another; the messages can then be retrieved with an e-mail client using either POP or IMAP. In addition, SMTP is generally used to send messages from a mail client to a mail server. This is why you need to specify both the POP or IMAP server and the SMTP server when you configure your e-mail application.

Source: Here

Let’s begin

Connecting to POP3

Open Telnet (Start – Run – CMD – Telnet) and write the following line:

TELNET Servername.Domain.TLD 110 (in our example TELNET some.domain.com 110).


Figure 1: Connecting to your Exchange Server via POP3

What do we see here?

+OK                                             - The Exchange Server accepts Connection to Port 110

Exchange Server 2003 POP3           – It is a Exchange 2003 Server

Version 6.5.7226.0                             – The Exchange Version Number

some.domain.com                                – The FQDN of the Exchange Server

These are some helpful information about our connection.

Let’s go further:


Figure 2: POP3 communication

What do we see here?

USER MSEXchangeORG     – The name of the user to connect to the mailbox

PASS Fake001                  – The password of the user (transmitted unencrypted over the network)

LIST                                 – Lists all E-Mails in the mailbox

RETR 1                             – Display the selected E-Mail

A very interesting part is the displayed body of the E-Mail. You can see the encapsulation of the E-Mail, MIME type, Message ID and much more helpful information.

POP commands

USER

The User you would like to connect to
PASS The password of the user (transmitted unencrypted over the network)
STAT Overview over the POP3 mailbox
LIST Displays every message in listform
RETR Displays selected message (RETR 1)
DELE Deletes selected message (DELE 1)
NOOP NO Operation
RSET Undo DELE function
QUIT End POP3 Session

Connecting to SMTP

Open Telnet (Start – Run – CMD – Telnet) and write the following line:

TELNET Servername.Domain.TLD 25 (in our example TELNET some.domain.com 25).


Figure 3:
EHLO commands

SMTP supports two verbs: HELO an EHLO

The HELO or EHLO verbs in SMTP are how the client identifies itself to the server. Clients that use single-label domain names, or domain names that the server cannot look up in the DNS database, are broken or misconfigured.

EHLO is the successor of the HELO verb and supports many more commands. The supported EHLO verbs are different from Mailserver to Mailserver. Exchange 2003 supports the EHLO verbs displayed in (Figure 3).

A very important EHLO verb is AUTH. AUTH lists the supported authentication methods for connecting to the SMTP Server. Exchange 2003 supports GSSAPI, NTLM and LOGIN.

Some ISP SMTP servers doesn’t support AUTH. They use SMTP after POP. SMTP after POP authenticates a user through a successful POP3 connection and lets him use the SMTP protocol with the applied credentials through the POP3 connect.

In our example we use the basic HELO command to connect.


Figure 4: Write a e-mail through telnet

What do we see here?

220 some.domain.com            – the Server listens on the given SMTP port

Microsoft ESMTP Mail Service         - This Server supports Extended SMTP

Version: 6.0.3790.0 ready             - This SMTP Service is hosted by Windows 2003

HELO                                           - Initiates connection (requires domain name by most SMTP

servers)

250 some.domain.com            – Server accepts connections on IP address 111.111.111.111

MAIL FROM: Name@domain.tld       - The Sender of the Message

RCPT TO: Name@domain.tld          - The Reciepient of the Message

DATA:                                          – Input e-mail data for subject and body

SUBJECT:                                     - the subject line of the message

Enter the data for the message body. At the end of the message click <CRLF> “.” <CRLF>

The message will be transmitted through the destination address through exchange.

SMTP commands

HELO Identifies the Client
MAIL Specifies Mail Sender
RCPT The Reciepient of the message
DATA The Data part of the message
RSET Resets message transmiting
VRFY Verifies e-mail address
EXPN Expand a mailing list
DSN Delivery Status Notification
HELP Displays help
NOOP NO Operation
TURN Mail TURN
ETRN Extended TURN
VERB Verbose Mode
QUIT End SMTP Session

Conclusion

Connecting to POP3 Mailboxes and sending E-Mails through SMTP with the help of Telnet will give you a good understanding about the functions of these processes. I like Telnet to troubleshoot POP3 and SMTP issues.

Related Links

POP3 RFC
Here

SMTP RFC
Here

Administering POP3/SMTP/IMAP
Here

 

Articles Original Posted by: Here

  • Published: Jul 29, 2004
  • Updated: Jul 29, 2004
  • Author: Marc Grote
This entry was posted in Microsoft Exchange. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>