Microsoft Telnet sessions are applied in many systems. Here we will introduce the operations related to Microsoft Telnet sessions. Hope to help you. The following is a detailed description. How to telnet to port 25 on the computer that runs the Simple Mail Transmission Protocol (SMTP) Service to solve SMTP communication problems. By default, the SMTP listening port is 25.
You can select the following troubleshooting steps based on your problem type. For example, if you encounter problems when sending emails through SMTP between two Microsoft Exchange 2000 Server servers, you can test the SMTP connection by using Telnet on the sending server to connect to port 25 on the target server. Or, if you encounter problems when receiving SMTP emails from the Internet, you can follow the steps listed in this article, test the connection between hosts that reside on the Internet but are not on your network and your SMTP server. For more information, there are multiple SMTP variants in the Microsoft product line. The SMTP service of Microsoft Windows product line is included in Internet Information Service (IIS), while in Microsoft Windows NT Server 4.0, SMTP service is included in Option Pack. In a newer version of Windows, IIS has been integrated into the operating system, and you can use "add or delete programs" in "Control Panel" to add IIS. In addition, both Exchange 2000 and Microsoft Exchange Server 2003 use the existing SMTP service and other features in IIS. Microsoft Exchange Server versions 4.0, 5.0, and 5.5 both contain their own SMTP versions in the form of Internet Mail Connector (IMC) or Internet Mail Service (IMS ).
Note: In Exchange 5.0 and later versions, Internet Mail ctor (IMC) is renamed as Internet Mail Service.
Before starting a Telnet session, you must have the complete SMTP email address of the target user to send the test email. The email address must be in the following format: User@Site.Domain.com you can also have a fully qualified domain name (FQDN) or IP address (for example, 10.120.159.1) for the server computer that runs the SMTP service ). If the server is in your organization, you may already have this information. If the server is an external server, the easiest way to find this information is to use Nslookup.exe to find the DNS records containing this information.
For more information about NSlookup, click the following article number to view the article in the Microsoft Knowledge Base: 200525 use NSlookup.exe to obtain other information about how to obtain Internet Mail exchanger records, click the following article number to view the article in the Microsoft Knowledge Base: 203204 XFOR: how to obtain Internet Mail exchanger records to ensure that SMTP is enabled on the server on which the SMTP service is running. To test whether SMTP has been started, you can run the basic test listed in this article and verify that you will receive the 220 message from the remote server. This will also verify that SMTP is running.
Note: Some Telnet applications require you to enable the local ECHO function to view the entered commands. To perform this operation in a Microsoft Telnet session, type set local_echo at the command prompt. In Microsoft Windows XP, type set localecho instead of set local_echo.
Perform the following steps to ensure the communication between the host and the remote SMTP server. If you receive the following error message after you type any of the following commands, it means that the SMTP server cannot identify the content you typed because of a syntax error or command error: 500 Command not recognized check this Command and type it again, or verify that you are communicating directly with the Microsoft SMTP server.
Note: Microsoft Telnet does not allow you to use the Backspace key. If an error occurs while typing, you must press Enter to start typing a new command.
In the following steps, run Telnet from the command line. To open the command line, click Start, click Run, Type cmd in the open box, and then click OK ".
1. You can start a Microsoft Telnet session by using the Telnet command in the following format:
Note: Press Enter after each line of content is entered. For example, enter telnet mail.contoso.com 25. Note: You can replace the server name with the IP address or FQDN of the SMTP server you want to connect. Remember to press Enter after entering each command.
If this command works, you will receive a message similar to the following from the SMTP server: 220 site.contoso.com Microsoft Exchange Internet Mail Connector note: because there are many different versions of Microsoft SMTP or third-party SMTP servers, you may receive different messages from the receiving server. However, you will certainly receive a 220 message containing the server's FQDN and SMTP version. In addition, Microsoft SMTP of all versions contains the word "Microsoft" in message 220.
2. run the following command to Start Communication: EHLO test.com. Note: You can use the HELO command, but EHLO is a verb that extends the SMTP verb set. All current Microsoft implementations of SMTP support this verb set. Unless you think there is a problem with the extended SMTP verb, it is best to use EHLO. If the command succeeds, you will receive the following message: 250 OK.
3. type the following command to notify the MAIL sender to receive the SMTP server: mail from: Admin@test.com
Note: This address can be any SMTP address you want to use, but it is best to consider the following:
1. some smtp mail systems filter emails Based on the mail from: address, and prohibit some IP addresses FROM connecting to the smtp mail system, or if the connection IP address does not match the domain of the smtp mail system, it also disables this address from sending emails to the SMTP mail system. In this example, the domain is test.com.
2. if you do not use a valid email address when sending an email, you cannot determine whether there is a problem when sending the email because the undelivered report (NDR) cannot reach an invalid IP address.
3. If you use a valid email address, you will receive the following message FROM the SMTP server: 250 OK-MAIL FROM Admin@test.com
4. type the following command to notify the recipient of the mail sent to the SMTP server.
Note: It is best to always use the valid recipient SMTP address in the domain to be sent. For example, if you want to send to a firstname.lastname@example.org, you must ensure that a email@example.com exists in the domain. Otherwise, you will receive the NDR.
Use the SMTP address of the person you want TO send TO type the following command: rcpt to: User@Domain.Com you will receive the following message: 250 OK-Recipient User @ Domain. Com
5. type the following command to notify the SMTP server that you are ready to Send DATA: data receives the following message: 354 Send DATA. End with CRLF. CRLF
6. You can now start typing Part 1 of the email. Users will see this part of the email in their inbox. Type the following command to add the topic line: Subject: test message press Enter twice. This command does not display any information.
Note: Press Enter twice to be consistent with Request for Comments (RFC) 822 and 2822. It specifies that the 822 command must be followed by an empty line.
7. type the following command to add the mail body: This is a test message you will not see a response from this command.
8. Type A period (.) In the next blank line and press Enter. You receive the following message: 250 OK
9. type the following command to close the connection: QUIT, you will receive the following message: 221 closing connection
10. Verify that the recipient has received the message you sent. If any error event message appears in the Application Event Log or an error occurs when receiving the email, check the host configuration or communication. In addition to the basic test steps listed earlier in this article, you can also use delivery receipt to perform a two-way test on the mail. You can use this method to verify whether the SMTP server can accept inbound connections and generate a delivery receipt for the sender to test the outbound connection of the SMTP server.
To deliver delivery receipts for test mail requests, see Step 1 in the "Basic test" section of this article to ensure that the information provided is a valid email address that can receive delivery receipts. Then, in step 1 in the basic test section of this article, type the following command in the Microsoft Telnet session: rcpt to: User@Site.Domain.Com running y = success, failurestelnet mail.contoso.com 25 220 site.contoso.com Microsoft Exchange Internet Mail conneehehlo test. com250 OK mail from: Admin@test.com 250 OK-mail from Admin@test.com rcpt to: User@Domain.Com 250 OK-Recipient User @ Domain. com DATA 354 Send data. end with CRLF. CRLF Subject: test message press Enter twice . This is a test message you will not see a response from this command. Type a period (.) In the next blank line and press Enter. 250 OK QUIT 221 closing connection: 500 format error, command unrecognized (this error also includes command line too long) 501 parameter format error 502 command cannot implement 503 error command sequence 504 command parameters cannot implement 211 system status or system help response 214 help information 220 Service ready 221 service disable transport channel 421 service not ready, disable the transmission channel (this response can be used as a response to any command when it must be disabled). The mail operation required by 250 is completed. 251 the user is not local and the mail operation requested by 450 is not completed, mailbox unavailable (for example, mailbox busy) 550 requires incomplete mail operations, mailbox is unavailable (for example, mailbox is not found, or inaccessible) 451 give up the required operations; 551 of non-local users encountered an error during the processing. Please try 452 of the system storage is insufficient. The required operation did not perform 552 of excessive storage allocation, and the required operation did not perform 553 mailbox names unavailable, the required operation is not performed (for example, the email format is incorrect). 354 start email input, End the 554 operation with LF>.