0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

今更言えない、httpサーバー、メールサーバーとのチャットの方法

Last updated at Posted at 2025-03-08

初めての動作チェックには telnet コマンドによる
サーバーとのチェックが最も簡単です

今やtelnetコマンドがないかもしれませんので

apt install telnet
yum install telnet

等とインストールしましょう

なお、そのためにポートをわざわざ開ける必要はありません

この記事ではSSLでのチェックを行いません

http

telnet example.com 80

Trying 192.168.0.1...
Connected to example.com.
Escape character is '^]'.

GET / HTTP/1.1
Host: example.com
(空行)

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 08 Mar 2025 20:28:04 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://example.com/

以下HTML
Connection closed by foreign host.

常時SSLをしているので301が帰ってきています。通常であれば200が帰ります

smtp

telnet smtp.example.com 25

Trying 192.168.0.1...
Connected to smtp.example.com.
Escape character is '^]'.
220 example.com ESMTP MAIL

helo example.com

250 mail.example.com

mail from: <example@example.com>

250 2.1.0 Ok

rcpt to: <test@test.com>

250 2.1.5 Ok

data

354 End data with <CR><LF>.<CR><LF>

From: <example@example.com>
To: <test@test.com>
Subject: test
(空行)
test
.

250 2.0.0 Ok: queued as ADB0A194B31A

quit

221 2.0.0 Bye
Connection closed by foreign host.

pop

telnet pop.example.com 110

Trying 192.168.0.1...
Connected to pop.example.com.
Escape character is '^]'.
+OK Dovecot ready.

user アカウント

+OK

pass パスワード

+OK Logged in.

list

+OK 1 messages:
1 ???
.

retr 1

+OK ??? octets
メール内容
.

quit

+OK Logging out.
Connection closed by foreign host.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?