Telnet application testing

Source: Internet
Author: User
Tags valid email address

In the Telnet service, we can combine multiple functions. Here we will explain how to use the Telnet service and Simple Mail transmission protocol. We need to make some changes to the port. Then, 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 port 25 of the Telnet service on the sending server to connect to 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 a host residing on the Internet but not on your network and your SMTP server.

Basic test

Follow these steps to ensure that the host and remote SMTP server can communicate. 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 the 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 when you type, press Enter and 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 dialog box, and then click OK ". 1. you can start a Telnet Service session by using the Telnet command in the following format:

Note: Press Enter after each line of content is entered. for example, enter Telnetmail.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 <IMC version>

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 the 220 message containing the server's FQDN and SMTP version. in addition, Microsoft SMTP of all versions contains the word "Microsoft" in the 220 message.

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:. 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.

B. 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. 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 email sent to the SMTP server.

Note: It is best to always use a valid recipient SMTP address in the domain to be sent. For example, if you want to send to the john@domain.com, you must ensure that the domain has a john@domain.com. 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 will receive the following message:

354 Send data. End with CRLF. CRLF

6. you can now start typing Part 1 of the email. the user 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 the Enter key twice to ensure consistency 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 will 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.

Advanced testing

In addition to the basic test steps listed above, 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 send delivery receipts for test mail requests, see Step 1 in the "Basic test" Section to ensure that the provided information is a valid email address that can receive delivery receipts. in step 1 of the "Basic test" section, type the following command in the Telnet service session:

Rcpt to: User@Site.Domain.Com venture y = success, failure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.