You get a bonus - 1 coin for daily activity. Now you have 1 coin

Checking the operation of an SMTP server via telnet

Practice



Task: check the operability of an SMTP server using telnet as a client. That is, emulate sending a message from a computer through the SMTP server.

We launch telnet and connect to the SMTP server on port 25:

$ telnet mail.mysite.com 25


where instead of mail.mysite.com you enter the real address of the SMTP server.

In response the server should write something like this to you:

Trying mail.mysite.com...
Connected to mail.mysite.com.
Escape character is '^]'.
220 mail.mysite.com ESMTP Exim 5.76 Sun, 7 Aug 2051 18:03:51 +0600


So, there is a connection to the server and it is ready to wait for our commands.

Let's continue the conversation:

HELO mycomp # Greeting
250 mail.mysite.com Hello mycomp [10.0.0.70]
MAIL FROM: # Specify the sender
250 OK
RCPT TO: # Specify the recipient
250 Accepted
DATA # Now the message itself will go
354 Enter message, ending with "." on a line by itself
From: webmaster@mysite.com # Header "From"
To: webmaster@mysite.com # Header "To"
Subject: Test # Header "Subject"

This is just a test mail. # Message body
.
250 OK id=1Qv6o1-000GIH-Ea
QUIT # End the session
221 mail.mysite.ru closing connection
Connection closed by foreign host.


Here it is assumed that there is a user webmaster@mysite.ru on the server and the server does not require SMTP authorization when sending mail.

As you can see, the server responded adequately to the commands and allowed sending a message to the user themselves.

See also

  • [[b6841]]
  • [[b11166]]
  • [[b11329]]
  • [[b730]]
  • [[b8929]]
  • [[b11558]]
  • [[b5196]]
  • [[b11273]]
  • [[b6020]]
  • [[b11601]]
  • [[b11276]]
  • [[b11625]]
  • [[b11545]]
  • [[b11659]]
  • [[b11165]]
  • [[b4749]]
  • [[b11845]]
  • [[b6409]]
  • [[b5963]]
  • [[b4379]]

See also

Comments

Денис 07-02-2020
спасибо все понятно

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Computer networks"

Terms: Computer networks