アプリケーション層(実習の実演例)(BNS 補助資料)

proxy

Web (HTTP/http/80)

proxy経由
> ezTerm.rb www.google.co.jp 80
GET /search?q=SMTP HTTP/1.0
                                                  <--- 空行を送っている
HTTP/1.0 200 OK                                       <--- ここから下がレスポンス
Date: Wed, 27 Jun 2020 02:32:47 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=Shift_JIS
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: ............
Vary: Accept-Encoding
X-Cache: MISS from proxy.nagano.ac.jp
X-Cache-Lookup: MISS from proxy.nagano.ac.jp:3128
Via: 1.0 proxy.nagano.ac.jp (squid/3.1.23)
Connection: close
                                                    <--- レスポンス内の空行
<!doctype html><html itemscope="" itemtype="http://schema.org/SearchResultsPage" lang="ja"><head>  ......
メールの流れ

メール

(昔の実演記録です)

メール送信(SMTP/smtp/25)

SMTP (SMTPのコマンド一覧なども参照下さい)

> ezTerm.rb pevw smtp
220 pevw.nagano.ac.jp ESMTP Postfix
HELO nagano.ac.jp
250 pevw.nagano.ac.jp
MAIL from: nobu@nagano.ac.jp
250 2.1.0 Ok
RCPT to: hiraoka@nagano.ac.jp
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
ahifuahwiefuha
ajfeajiefuhaief
.
250 2.0.0 Ok: queued as 08C672C003D
QUIT
221 2.0.0 Bye
>
メール受信(POP/pop3/110)

POP
(ネットにある解説記事 たとえばここも参照)

C:\Users\NEC-PCuser\Documents\class\BNS>ezTerm.rb pemail pop3
+OK Dovecot ready.
USER hiraoka
+OK
PASS *******
+OK Logged in.
LIST
+OK 1068 visible messages (18261240 octets)
1 4528
2 5098
3 2854
4 3934
5 9117
6 7527
7 55183
8 18862

……

1066 10520
1067 81279
1068 326
.
retr 1068
+OK 326 octets
Return-Path: <nobu@nagano.ac.jp>
X-Original-To: hiraoka@nagano.ac.jp
Delivered-To: hiraoka@nagano.ac.jp
Received: from nagano.ac.jp (unknown [172.25.168.240])
        by pemail.nagano.ac.jp (Postfix) with SMTP id 08C672C003D
        for <hiraoka@nagano.ac.jp>; Wed, 27 Jun 2020 11:48:27 +0900 (JST)

ahifuahwiefuha
ajfeajiefuhaief
.
quit
+OK Logging out.
>