メール - 北海道大学

Download Report

Transcript メール - 北海道大学

インターネットサーバと
メール配送の仕組み
情報実験 第13回
2007/01/26
土屋 貴志
北海道大学 理学院 宇宙理学専攻
地球流体力学研究室 M 1
目次
•
•
•
•
サーバと通信規約の復習
メール配送システム
メールの構造
メール利用の際の注意
サーバと通信規約の復習
サーバ (server)
• ネットワークを通して色々な機能やサービス
を提供するコンピュータ or ソフトウェア
• 情報実験 第12回
サーバ・クライアントシステム
通信を行うには約束事が必要
通信規約(プロトコル)
• コンピュータがネットワーク上で
通信するための約束事
• 情報実験 第5回
最低限 Internet
メール配送システム
電子メール (E-mail)
• 電気的な符号を使ってメッセージを伝達
する通信手段
• 具体例
– 携帯メール
– Web メール
– ISP (プロバイダ) から提供される
メールサービス
– etc…
メールアドレス
• メールの届け先の住所
hoge @ mail . ep . sci . hokudai . ac . jp
ユーザID
組織名
ホスト名
国名
組織属性
ドメイン名
メール配送の流れ
B
A
メールサーバ A
クライアント A
イ
ン
タ
ー
ネ
ッ
ト
メールサーバ B
クライアント B
メール配送の流れ
B
A
メールサーバ A
クライアント A
イ
ン
タ
ー
ネ
ッ
ト
メールサーバ B
クライアント B
メール送信 (クライアント→サーバ)
A
SMTPサーバ
SMTP
MTA
メールサーバ A
MUA
クライアント A
MUA
• Mail User Agent の略
• 電子メールの読み書きやメールサーバへ
の送信,サーバからのメールの受信などを
行なうソフト.
• 例
– Outlook Express, Thunderbird, etc…
MTA
• Message Transfer Agent の略
• 電子メールを配送するソフト
– ユーザが送信したメールを受け取り,他の
サーバと連携してバケツリレー式に目的地ま
で配送したり,届いたメールをユーザが受け
取るまで保管したりする.
• 例
– sendmail, qmail, etc…
SMTP
• Simple Mail Transfer Protocol の略
• サーバ間でメールのやり取りをしたり,クラ
イアントがサーバにメールを送信する際に
用いられるプロトコル
• 25 番ポートを使用
メール配送の流れ
B
A
メールサーバ A
クライアント A
イ
ン
タ
ー
ネ
ッ
ト
メールサーバ B
クライアント B
メール送信(サーバ→サーバ)
SMTPサーバ
MTA
メールサーバ A
SMTP
イ
ン
タ
ー
ネ
ッ
ト
SMTP
SMTPサーバ
MTA
POP・IMAP
サーバ
メールサーバ B
メール配送の流れ
B
A
メールサーバ A
クライアント A
イ
ン
タ
ー
ネ
ッ
ト
メールサーバ B
クライアント B
メール受信(POP の場合)
B
SMTPサーバ
MTA
ユーザからの要求
POP・IMAP
サーバ
によってメールを
取り出す
メールBOX
B
メールサーバ B
クライアント B
POP
MUA
POP
• Post Office Protocol の略
• メールを保存しているサーバからメールを
受信するためのプロトコル
• 110 番ポートを使用
メール受信(IMAP の場合)
B
SMTPサーバ
MTA
POP・IMAP
サーバ
ユーザからの要求
メールBOX
によってメールを見る
B
クライアント B
メールサーバ B
IMAP
MUA
IMAP
• Internet Message Access Protocol の略
• メールを保存しているサーバからメールを
見るためのプロトコル
• 143 番ポートを使用
メールサーバ
• メールサーバとは
– メールの送信用サーバ(SMTPサーバ)
– メールの受信用サーバ(POP・IMAPサーバ)
機能のどちらか,または両方を持つ
サーバの総称
メールサーバのおかげで我々は,コンピュー
タを常時電源を点け,ネットワークに接続して
いなくてもメールを利用できる
メールの構造
メールの構造
• メールヘッダ
– 宛先,送信者,件名,経路等の情報が記述さ
れている
• 空白行
• 本文
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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 !!
内容の「種類」 : テキスト,JISコード
Date: Fri, 30 Jan 2004 16:28:33 +0900 (JST)
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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
壺 買いませんか。。マ・クベ
メールヘッダの具体例
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 16872 invoked by uid 1467); 30 Jan 200407: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 -0000 (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 -0000 (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 !!
本文16:28:33 +0900 (JST)
Date: Fri, 30 Jan 2004
X-Mailer: TSmtpClient ver. 1.0
壺 買いませんか。。マ・クベ
メールヘッダの具体例
メール利用の際の注意
メール利用の際の注意
• マナー
– 初めに名乗る
– 機種依存文字を使わない
• 半角カタカナ,「①」,「℡」 など
– あまり大きなファイルを添付しない
– HTML 形式に注意
– チェインメールを送らない
メール利用の際の注意
• セキュリティ
– 盗聴
• クレジットカード番号,暗証番号などを送らない
– デマメール
• 迂闊に信じない
– 特にフィッシング詐欺に注意
– ウイルスメール
• 添付ファイルを無闇に開かない
参考文献
• IT 用語辞典 e-word
http://e-words.jp/
• SHARP | メールヘッダの読み方
http://www.sharp-pcstudio.com/disp.asp?cno=5&tbno=0&dno=19#p3
• sendmail と qmail による
Linux メールサーバー構築ガイド
高橋隆雄,エーアイ出版