- You can start a Telnet session by using the Telnet command in the following format:
Note Press ENTER after you type each line.telnet servername portnumberFor example, type:telnet mail.contoso.com 25Note You can replace servername with the IP address or the FQDN of the SMTP server that you want to connect to. Remember to press ENTER after each command.
If the command works, you receive a response from the SMTP server that is similar to the following:Note There are different versions of Microsoft SMTP or third party SMTP servers, and you may receive different responses from the receiving server. What is important is that you receive the 220 response with the FQDN of the server and the version of SMTP. Additionally, all versions of Microsoft SMTP include the term "Microsoft" in the 220 response.220 site.contoso.com Microsoft Exchange Internet Mail Connector
- Start communication by typing the following command: EHLO test.comNote You can use the HELO command, but EHLO is a verb that exists in the Extended SMTP verb set that is supported in all current Microsoft implementations of SMTP. It is a good idea to use EHLO, unless you believe that there is a problem with the Extended SMTP Verbs.
If the command is successful, you receive the following response:250 OK
- Type the following command to tell the receiving SMTP server who the message is from: MAIL FROM:Admin@test.comNote This address can be any SMTP address that you want, but it is a good idea to consider the following issues:
- Some SMTP mail systems filter messages based on the MAIL FROM: address and may not permit certain IP addresses to connect or may not permit the IP address to send e-mail to the SMTP mail system if the connecting IP address does not match the domain where the SMTP mail system resides. In this example, that domain is test.com.
- If you do not use a valid e-mail address when you send a message, you cannot determine if the message had a delivery problem, because the non-delivery report (NDR) cannot reach an IP address that is not valid. If you use a valid e-mail address, you receive the following response from the SMTP server:
250 OK - MAIL FROM Admin@test.com
- Type the following command to tell the receiving SMTP server whom the message is to.
Note It is a good idea to always use a valid recipient SMTP address in the domain that you are sending to. For example, if you are sending to john@domain.com, you must be certain that john@domain.com exists in the domain. Otherwise, you will receive an NDR.
Type the following command with the SMTP address of the person you want to send to:RCPT TO: User@Domain.ComYou receive the following response:250 OK - Recipient User@ Domain.Com
- Type the following command to tell the SMTP server that you are ready to send data: DATAYou receive the following response:
354 Send data. End with CRLF.CRLF
- You are now ready to start typing the 822/2822 section of the message. The user will see this part of the message in their inbox. Type the following command to add a subject line: Subject: test messagePress ENTER two times. You do not receive a response from this command.
Note The two ENTER commands comply with Request for Comments (RFC) 822 and 2822. 822 commands must be followed by a blank line. - Type the following command to add message body text: This is a test message you will not see a response from this command.
- Type a period (.) at the next blank line, and then press ENTER. You receive the following response:
250 OK
- Close the connection by typing the following command: QUITYou receive the following response:
221 closing connection
- Verify that the recipient received the message that you sent. If any error event messages appear in the application event log, or if there are problems receiving the message, check the configuration or the communication to the host.
16 December 2009
Test de courriel à la main avec telnet
Bien pratique de pouvoir avoir des traces quand un problème de serveur de courriel survient. Une façon d'en savoir un peu plus long est de faire nôtre test en envoyant un courriel avec l'utilitaire telnet:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment