Topic Last Modified: 2005-05-24
Telnet is an extremely useful tool for troubleshooting issues related to SMTP and mail flow. For example, you can use telnet to:
Note:
The following procedure shows you how to test the process of an internal user sending mail to a remote user when basic authentication is required for relaying mail outside your organization.
Before you perform the procedure in this topic, read Troubleshooting Mail Flow and SMTP.
The following permissions are required to perform this procedure:
To use telnet to test SMTP communication
Open a telnet session: From a command prompt, type telnet, and then press ENTER.
Type set local_echo on a computer running Microsoft Windows® 2000 Server or SET LOCALECHO on a computer running Windows Server™ 2003 or Windows XP, and then press ENTER. This command allows you to view the responses to the commands.
Note:
For a list of available telnet commands, type set ?.
Type o <your mail server domain> 25,and then press ENTER.
Type EHLO <your mail server domain>, and then press ENTER.
Type AUTH LOGIN. The server responds with an encrypted prompt for your user name.
Enter your user name encrypted in base 64. You can use one of several tools that are available to encode your user name.
The server responds with an encrypted base 64 prompt for your password. Enter your password encrypted in base 64.
Type MAIL FROM:<[email protected]>, and then press ENTER. If the sender is not permitted to send mail, the SMTP server returns an error.
Type RCPT TO:<[email protected]>,and then press ENTER.If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error.
Type DATA.
If desired, type message text, press ENTER, type a period (.), and then press ENTER again.
If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:
250 2.6.0 <[email protected].
The following example shows a telnet test sending mail from contoso.com to a remote domain with a successful result:
250-mail1.fourthcoffee.com Hello [172.16.0.0]
250-TURN
250-ATRN
250-SIZE 5242880
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM
250-AUTH GSSAPI NTLM
250-X-LINK2STATE
250-XEXCH50
250 OK
334 VXNlcm5hbWU6
334 UGFzc3dvcmQ6
235 2.7.0 Authentication successful.
250 2.1.0 [email protected] OK
250 2.1.5 [email protected]
354 Start mail input; end with <CRLF>.<CRLF>
.
250 2.6.0 <[email protected]> Queued mail for delivery
For more information, see Securing Your Exchange Server.