Received: from spamsource.zeon

Download Report

Transcript Received: from spamsource.zeon

メール配送システム
情報実験第 12 回
2011/07/29
荻原 弘尭
0/43
目次
•
•
•
•
メール配送の仕組み
メールの構造
メール利用の際の注意
メールに関するセキュリティ
1/43
メール配送の仕組み
2/43
電子メール(e-mail)
• ネットワークを通じてメッセージやファイルの
やり取りを行うための仕組みの一つ
• 具体例
‒
‒
‒
‒
携帯メール
webメール
ISP (プロバイダ) から提供されるメールサービス
etc…
3/43
メールサーバ
• ネットワークを通じて電子メールの送受信を
行うサーバ
メールサーバを設置しておけば,手元の計算機
を常時ネットワークに接続しなくてもよい!
(メールサーバがメールを取り置きしてくれる)
4/43
メール配送の流れ
送信側
受信側
ネットワーク
を介してメールを メールサーバ
メールサーバ
(送信者側)
受信側のサーバへ (受信者側)
クライアント (受信者)
クライアント (送信者)
5/443
メールアドレス
• 配送先を特定する
hoge @ ep.sci.hokudai.ac.jp
ローカル部
ドメイン部
ドメイン部 :配送先のメールサーバを指定するもの
ローカル部:メールサーバ上の受取先を指定するもの
(具体的にはユーザ ID やアカウント名)
6/43
メール送信
送信側
MTA
SMTP
受信側へ
メールサー
バ (送信者
SMTP
側)
MUA
• ユーザ(送信者)はメール
サーバ (送信者側)宛に
メールを送信
‒
• メールサーバ(送信者側)
はメールサーバ(受信者
側)に送信
‒
送信者
MUA を利用
‒
MTA を利用
通信プロトコルは SMTP
7/43
MUA
• Mail User Agent の略
MTA
SMTP
受信側へ
メールサー
バ (送信者
SMTP
側)
MUA
送信者
• ユーザがメールを扱うため
のソフトウェア
– 電子メールの読み書きを行
う
– メールサーバとメールの送
受信を行う
– メールソフト, メーラとも
呼ばれる
• Windows Live mail, Mail,
Thunderbird , Mew など
8/43
MTA
MTA
SMTP
受信側へ
メールサー
バ (送信者
SMTP
側)
MUA
送信者
• Mail Transfer Agent の略
• 電子メールを配送する
ソフトウェア
– MUA から受信したメールを,
ネットワークを介して
宛先のサーバまで配送
(バケツリレー方式)
– 届いたメールをユーザが
受け取るまで保管(受信者側)
• postfix,exim,sendmail,
qmail など
9/43
SMTP
MTA
SMTP
受信側へ
メールサー
バ (送信者
SMTP
側)
• Simple Mail Transfer
Protocol の略
• MUA からサーバへの送信
• サーバ間での送受信
• 25 番ポートを使用
MUA
送信者
10/43
メール受信と取り出し
•
•
受信側
メールサーバ (受信者
側) は受信したメールを
メールBOX
MTA
ユーザ毎に仕分けして 送信側から
保管
POP
メールサーバ
ユーザ(受信者)は
or
(受信者側)
IMAP
メールサーバ (受信者
側)が保管したメールを
MUA
取り出す
‒
プロトコルは POP
あるいは IMAP
受信者
11/43
メールの取り出し(POP の場合)
•
•
•
•
•
Post Office Protocol の略
標準で 110 番ポートを使用
メールを保存しているサーバからメールを
取りだすためのプロトコル
設定が手軽だが複雑な設定は困難
パスワードが平文なので注意が必要
‒
暗号化するには APOP や POP over SSL を
使用
12/43
メールの取り出し(IMAP の場合)
•
•
•
•
•
Internet Message Access Protocol の略
標準で 143 番ポートを使用
メールを保存しているサーバからメールを
見るためのプロトコル
複数の PC で同じように使うことができる(未
読, 既読など)
デフォルトでパスワードの暗号化ができる
13/43
Webmail
• Web ブラウザで使用できる電子メール
• どこからでもメールを送受信したり, チェッ
クできる
• メールを見るためのプロトコルは HTTP
• Gmail, Yahoo! メール, Hotmail, ELMS mail
など
14/43
メールの構造
メールの構造
• メールヘッダ
- 宛先,送信者,件名,経路等の情報が記述され
ている
• 最後の空白行で本文と分けられる
• 本文(ボディ)
16/43
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
17/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked 他のメッセージから識別するための
by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
もの. 決して重複してはならない。
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp
with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
18/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
送信エラー時など,そのエラーを
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
報告する宛先になるメールアドレス
i0Q29oRl003847; Fri, 30 Jan
2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。マ・クベ
19/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon配送先のメールアドレス
(HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
20/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
このメールが経由してきたサーバ情報.
To: [email protected]
複数のサーバを経由してきたメールに
Subject: TsuBo !!
は,いくつもの「Received:」がついている
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
21/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
MIME のバージョン
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
22/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33
+0900 (JST)
内容の種類と文字コード
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
23/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
メール本文のエンコード方式
Date: Fri, 30 Jan 2004 16:28:33
+0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
24/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by 差出人のメールアドレス
wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30
Jan 2004 07:28:33 +0900 (JST)
簡単に偽装することができる
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
25/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
宛先のメールアドレス
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
26/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type:
Text/Plain; charset=iso-2022-jp
メールの題名・件名
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
27/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding:
7bit
メールの送信日時
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
28/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
メール作成に用いた
Content-Transfer-Encoding: 7bit
ソフトウェア名
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
29/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
空白行
Subject: TsuBo
!!
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
30/43
メールヘッダの具体例
Message-id: <[email protected]>
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 2004 07:28:45
Received: from wickedrelay.com (HELO wickedrelay.com
[xxx.xxx.xx.xx]) by grey.ep.sci.hokudai.ac.jp with SMTP id
i0Q29oRl003847; Fri, 30 Jan 2004 07:28:42 +0900 (JST)
Received: from spamsource.zeon (HELO spamsource.zeon
[xxx.xxx.xxx.xxx]) by wickedrelay.com with SMTP id
i0Q2A4lw004738; Fri, 30 Jan 2004 07:28:33 +0900 (JST)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
From: tsubo <[email protected]>
To: [email protected]
Subject: TsuBo !! 本文
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
31/43
メールヘッダの具体例
メール利用の際の注意
32/43
メール利用の際のマナー
• 相手の立場になって読み返す
• 最初に宛名を書き, 次に名乗る
• 機種依存文字を使わない
– 半角カタカナ,「①」,「℡」 , 「Ⅱ」など
• あまり大きなファイルを添付しない
– 北大の場合 10 Mb 以上のメールは送受信
できない
• HTML 形式に注意
– 初期設定が HTML 形式のメーラがある
• チェインメールを送らない
33/43
メール利用の際の注意
• クレジットカード番号,暗証番号, パスワー
ドなどを送らない
- 盗聴される恐れがある
• 悪質なメールに注意
- スパムメール(迷惑メール)
- 詐欺メール
• 迂闊に信じない
• 特にフィッシング詐欺に注意
- ウイルスメール
• 添付ファイルを無闇に開かない
34/43
メール関するセキュリティ
35/43
メールに関するセキュリティ
• メールの偽装, 盗聴は実は簡単
- 差出人を詐称
- 配送途中のネットワーク盗聴、改竄
• 偽装防止のための技術: 電子署名
- デジタル文書の作者を証明し、かつ改竄されていないこ
とを保証するために付けられる署名情報
• 盗聴防止のための技術: 暗号化
- メール本文, 添付ファイルを暗号化し, 他人からの盗聴を
防ぐ
これらの技術には公開鍵暗号方式
がよく用いられる
36/43
公開鍵暗号方式
• データを暗号化, 復号化する方式の一つ
• 暗号化, 復号化に異なる 2 つの鍵(文字列)を使う
– 1 つの鍵だけで暗号化する方式はセキュリティ上危
険であるので鍵を 2 つ使用する.
– ユーザーは自分自身の公開鍵と秘密鍵を持つ
– 自分の公開鍵で暗号化されたデータは, 自分の
秘密鍵でしか復号化できない.
– 秘密鍵は自分しか持っておらず, 公開鍵は
自分とやり取りをする 全ての相手が持つ
37/43
公開鍵暗号方式
公開鍵 秘密鍵
秘
38/43
公開鍵暗号方式
公開鍵
秘密鍵
秘
39/43
公開鍵暗号方式
公開鍵
秘密鍵
秘
40/43
まとめキーワード
• MTA, MUA
• SMTP, POP, IMAP
• メールヘッダ
• メールマナー
• 電子署名, 暗号化, 公開鍵暗号方式
41/43
参考文献
• Dianna Mullet, Kevin Mullet 著 木田直子 訳, オーム社, IMAP
• 河野寿 著, 毎日コミュニケーションズ, 図解で明解 メールのしく
み
• メーリングリスト週刊情報誌ML weekly メールヘッダ入門
http://www.ml-info.com/weekly/archives/2002/020621t.html
• Webで学ぶ 情報処理概論 :用語解説 公開鍵暗号方式
http://www.infonet.co.jp/ueyama/ip/glossary/public_key.html
• @ IT :インターネット・プロトコル詳説
http://www.atmarkit.co.jp/fnetwork/
• IT 用語辞典 e-word
http://e-words.jp/
42/43