Test the port used to connect to the SMTP server via Telnet (1)

Source: Internet
Author: User
Tags nslookup fully qualified domain name

Many settings contain multiple protocols. Just like the port on which Telnet is connected to the SNMTP server we will explain today. How can this problem be solved? Next we will explain in detail how to telnet to port 25 on the computer running the Simple Mail Transfer 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 a host residing on the Internet but not on your network and your SMTP server.

More information

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 the Telnet connection, you must have the complete SMTP email address of the target user to send the test email 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 switch records, click the following article number to view the article in the Microsoft Knowledge Base:

203204 XFOR: how to obtain Internet Mail switch 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 applications require you to enable the local ECHO function to view the entered command. to perform this operation in the Microsoft Telnet connection, 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 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 MicrosoftSMTP 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 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 ".

You can start a Telnet connection 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:

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

220 site.contoso.com Microsoft Exchange Internet Mail Connector <IMC version>

Note: because there are many different versions of MicrosoftSMTP 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, all versions of Microsoft SMTP contain the word "Microsoft" in the 220 message.

Run the following command to Start Communication:

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:

250 OK

Type the following command to notify the sender of the email 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:


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.