What are the reasons for using telnet command?

Solution 1:

There are many reasons to use telnet. In your case it looks like the person was trying to connect to the SMTP port on a remote host. You would normally connect to a FQDN or ip address but this person was trying to connect to whatever ip address the naked domain resolves to. Why they were doing that is anybody's guess.

Solution 2:

telnet is a protocol used in several applications. E.g most MUDs still use telnet.

Non game uses for telnet include:

  1. Testing a mail server (telnet to port 25).
  2. Testing a web server.

Mail example:

>telnet mail.stack.nl 25
Trying 2001:610:1108:5010::104...
Connected to relay02.xxx.xxx.
Escape character is '^]'.
220 mx1.stack.nl ESMTP Postfix
HELO example.mydomain.tld
250 mx1.stack.nl

(That is the output of a mail server being greeted by my 'client'.)

Or testing the webserver here at serverfault.

telnet serverfault.com 80
Trying 64.34.119.12...
Connected to serverfault.com.
Escape character is '^]'.
HTTP/1.1
HTTP/1.0 400 Bad request
Cache-Control: no-cache
Connection: close
Content-Type: text/html
400 Bad request
Your browser sent an invalid request.

Connection closed by foreign host.

Note that these are the same command a client would sent. No extra options are gained. The advantage is that you do not need to install extra software (telnet usually comes preinstalled) and then you get the raw error message rather than some 'human friendly' message.