• お問い合わせ
  • ユーザー登録
製品一覧 サーバー デスクトップ ミドルウェア アプリケーション ハードウェア ハードウェア動作情報 購入


製品概要 機能と特徴 こんなことできます! SELinux Java CD 商用ソリューションonTurbolinux トレンドマイクロServerProtect 対応商用ソフトウェア ライセンスパック優待販売 サポートとシステム要件 収録パッケージ一覧 対応ハードウェア情報
サーバー

■SSL による POP3/IMAP4 の暗号化

POP3/IMAP4 のサービスを提供するときに、SSL を利用してサーバーとクライアントとの通信経路を暗号化することが可能です。サーバー、クライアントともに SSL に対応している必要がありますが、現在では多くのメールクライアントがサポートしています。


■鍵ファイルを作成

SSL で暗号化された POP3/IMAP4 サーバーを構築するには、openssl コマンドを実行して、/etc/mail/certs ディレクトリに ipop3sd.pem と imapsd.pem という名前の鍵ファイルを作成します。ipop3sd.pem は POP3 用の鍵ファイルであり、imapsd.pem は IMAP4 用の鍵ファイルとなります。imapsd.pem と ipop3sd.pem の内容は同一のものでも別のものでも構いません。

# mkdir -p /etc/mail/certs
# cd /etc/mail/certs
# openssl req -new -x509 -nodes -out imapsd.pem -keyout imapsd.pem
Using configuration from /var/ssl/openssl.cnf
Generating a 1024 bit RSA private key
...................................................++++++
................++++++
writing new private key to 'imapsd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Tokyo
Locality Name (eg, city) []:Shibuya
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Turbolinux
Organizational Unit Name (eg, section) []:Doc
Common Name (eg, YOUR name) []:Doc Administrator
Email Address []:doc@turbolinux.co.jp

作成後は、鍵ファイルが他のユーザーから参照されないようにファイルのパーミッションを変更します。

# chmod 600 ipop3sd.pem
# chmod 600 imapsd.pem


■ POP3 / IMAP4 サーバーの起動

POP3 / IMAP4 サーバーはスーパーサーバーデーモンである xinetd 経由で起動されます。起動にするには、以下のコマンドを実行します。

# chkconfig pop3s on
# chkconfig imaps on
# /etc/init.d/xinetd restart

次に /etc/hosts.allow に POP3 / IMAP4 サーバーへのアクセスを許可するホストをに指定します。以下のように指定をすれば、すべてのホストからのアクセス要求を受け入れるようになります。

ipop3sd: ALL
imapsd: ALL



<<Turbolinux 10 Server チュートリアルに戻る