Specific implementation steps of telnet SMTP (1)

Source: Internet
Author: User
Tags valid email address nslookup fully qualified domain name

Telnet is powerful. Especially in some aspects of control and management, it is even more popular. So today we will explain the problems related to telnet SMTP. 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 a host residing on the Internet but not on your network and your SMTP server. the Microsoft product line contains multiple SMTP variants. 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 functions in IIS. microsoft Exchange Server versions 4.0, 5.0, and 5.5 all 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 a complete SMTP email address for the target user to send this test message to. 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 the server computer running the SMTP service, for example, 10.120.159.1 ). 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. For more 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.

Make sure that SMTP is enabled on the server that runs the SMTP service. 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 whether SMTP is running. note: Some telnet SMTP 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.

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 telnet SMTP server cannot identify the content you typed because of a syntax error or command error:

 
 
  1. 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 while typing, you must press Enter and start to type 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 ". you can start a Telnet session by using the Telnet command in the following format: Note: Press Enter after each line of content is entered.

Telnet server name port number

For example, type:

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

 
 
  1. ? /P>
  2. 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.

Run the following command to Start Communication:

 
 
  1. EHLO test.com 

Note: You can use HELO commands, 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:

 
 
  1. ?/P> 
  2. 250 OK 

Run the following command to notify the sender of the email received by the telnet SMTP server:

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

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:

 
 
  1. ?/P> 
  2. 250 OK - MAIL FROM Admin@test.com 

Type the following command to notify the recipient of the email received by the telnet SMTP server.


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.