Dovecot IMAP · PDF fileDovecot IMAP Server Date: ... – Online vs. ... with GFS, OCFS2, ..
#mailerstudy 01 LT POP/IMAP入門
-
Upload
takashi-takizawa -
Category
Technology
-
view
2.914 -
download
3
Transcript of #mailerstudy 01 LT POP/IMAP入門
![Page 1: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/1.jpg)
メールサーバ勉強会 #mailerstudy 01 LT
POP3/IMAP入門
![Page 2: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/2.jpg)
私は誰
• 氏名: 滝澤 隆史 @ttkzw • 何やっている人
▫ メーラMuttの国際化や日本語対応パッチ作者 ▫ SpamAssassinの日本語対応パッチ作者
• メールシステムとの関わり ▫ システム管理者として1997年から2006年までメール
サーバの管理 ▫ 昔、qmail関連で色々やっていた。2006年にqmail捨
て捨て。Postfix/Dovecot遣いにクラスチェンジ ▫ 現在は個人サーバでメールサーバを運用 Postfix + Dovecot + Sieve(dovecot-pigeonhole) +
ClamAV + SpamAssassin + spamass-milter + Roundcube
2
![Page 3: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/3.jpg)
アジェンダ
• メールシステムの概要
• POP3
• IMAP
![Page 4: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/4.jpg)
![Page 5: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/5.jpg)
メールシステムの概要
![Page 6: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/6.jpg)
![Page 7: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/7.jpg)
POP3
• Post Office Protocol Version 3
• メールサーバ上のメールボックスからメールを取得するプロトコル。
![Page 8: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/8.jpg)
POP3
• プロトコル名(Post Office Protocol)のとおりに郵便局の私書箱をメールサーバ上のメールボックスと考えるとわかりやすい。
• 郵便局ではユーザー宛の手紙を私書箱に入れ、ユーザはその私書箱から手紙を取り出す。
![Page 9: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/9.jpg)
POP3サーバ
• POP3のサービスを提供するサーバ • レガシーなPOP3サーバーにはBSD popper,
qpopperがある。 ▫ 「えーマジqpopper? qpopperが許されるのは小学生までだよねー」
• IMAPサーバに付属のPOP3サーバを使うことが多い、というかほとんど ▫ Cyrus IMAP server, Courier IMAP Server,
Dovecot
• 個人的にはDovecot一押し
![Page 10: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/10.jpg)
POP3の一般的な使い方
• メーラーはPOP3を使ってPOP3サーバから取得したメールをローカル・ストレージ上のメールボックスに保存する。
• メーラーはPOP3サーバーにメールサーバ上のメールボックスから受信したメールを削除させる。
![Page 11: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/11.jpg)
POP3の主要なコマンド
• 認証 ▫ USER ▫ PASS ▫ APOP ▫ AUTH
• 一覧・状態 ▫ CAPA ▫ STAT ▫ LIST ▫ UIDL
• 操作 ▫ RETR ▫ TOP ▫ DELE
• 状態変更 ▫ STLS ▫ QUIT
![Page 12: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/12.jpg)
APOP
• MD5を使ったチャレンジ・レスポンス方式の認証を行う。 ▫ パスワードが通信経路で生で流れない利点がある。
▫ サーバー上でパスワードを生で保持する欠点がある。
• セキュリティ的に脆弱性が見つかっているため、利用してはいけない。 ▫ 代わりに、TLSあるいはPOP3 over SSL/TLSを使って通信路を暗号化すべき
![Page 13: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/13.jpg)
POP3サーバとの会話
• メールサーバ管理者の基本スキル
• 用意するものはtelnetとopenssl
• 平文通信の場合 ▫ telnet ホスト名 110
• STARTTLSを使う場合
▫ openssl s_client -connect localhost:110 -starttls pop3
• POP3 over SSL/TLSの場合 ▫ openssl s_client -connect localhost:995
![Page 14: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/14.jpg)
![Page 15: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/15.jpg)
IMAP
• Internet Message Access Protocol
• メールサーバ上のメールボックスにアクセスして、メールやフォルダを操作するためのプロトコル
![Page 16: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/16.jpg)
IMAPの特徴
• メールボックスをメールサーバ上に置いたまま利用する
![Page 17: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/17.jpg)
IMAPサーバ
• IMAPのサービスを提供するサーバ
• 代表的なオープンソースなIMAPサーバ ▫ Cyrus IMAP server, Courier IMAP Server,
Dovecot
• 個人的にはDovecot一押し
![Page 18: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/18.jpg)
IMAPの使い方
• メーラーがIMAPを使ってIMAPサーバを経由して、メールボックスにあるメールを読み、既読フラグを付ける。
• メールボックス内にフォルダを作ったり、そのフォルダにメールを移動したりすることもできる。
![Page 19: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/19.jpg)
IMAPのPOP3に対する利点
• メールサーバ上のメールボックスにメールが常に存在する • クライアントPCやメーラーが異なっても既読フラグを保持
したままで同じフォルダの同じメールを読むことができる
![Page 20: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/20.jpg)
フィルタリング機能
• IMAPそのものの機能ではないが、 サーバ上にメールボックスがあるため、 フィルタリング機能を組み込むことができる。
• フィルタリング機能により、メールの配送時にサーバ側でフォルダに振り分けできる ▫ 例) 迷惑メールを迷惑メールフォルダに振り分ける
▫ フィルタリング言語sieveの利用
![Page 21: #mailerstudy 01 LT POP/IMAP入門](https://reader033.fdocument.pub/reader033/viewer/2022052621/558a9cfcd8b42ae1108b4641/html5/thumbnails/21.jpg)
IMAPサーバとの会話
• メールサーバ管理者の基本スキル
• 用意するものはtelnetとopenssl
• 平文通信の場合 ▫ telnet ホスト名 143
• STARTTLSの場合
▫ openssl s_client -connect ホスト名:143 -starttls imap
• IMAP over SSL/TLSの場合 ▫ openssl s_client -connect ホスト名:993