- SquirrelMailの設定 -
メールサーバーが構築されていても、学校や会社内ではファイアーウォールがあり外部のメールサーバー宛のメールを Outlook Express などのメールソフトを利用し受信することができない場合があります。
しかし、WebMailであれば80ポートを通して見るので HP が閲覧可能な環境であればどこからでもメールをチェックすることができます。
そこで、私はPHPベースのWebMailであるSquirrelMailを導入することにしました。
調べた中でSquirrelMailはフリーのWebmailの中でも特に高機能なソフトです。
作業ディレクトリに移動します。 # cd /usr/src/redhat/RPMS/i386 squirrelmailをダウンロードしインストールしてください。 # wget http://ftp.sanguine.jp/pub/sahughes/rhx/squirrelmail/RPMS/ rh9/squirrelmail-ja-1.4.3a-3_rh9.noarch.rpm ← 実際は1行です。 # rpm -ihv squirrelmail-ja-1.4.3a-3_rh9.noarch.rpm SquirrelMailの設定 /usr/share/squirrelmail/config内にあるconf.pl(perlスクリプト)を実行することで設定できます。 前提条件として、perlがインストールされている環境を考えています。 # cd /usr/share/squirrelmail/config # ./conf.pl Command >>の所に文字を入力しEnterを押すことで設定を行なっていきます。 SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------- Main Menu -- 1. Organization Preferences 2. Server Settings 3. Folder Defaults 4. General Options 5. Themes 6. Address Books (LDAP) 7. Message of the Day (MOTD) 8. Plugins 9. Database D. Set pre-defined settings for specific IMAP servers C. Turn color off S Save data Q Quit Command >> d ← これが重要です。この設定を忘れてはまりました。courierを選択します。 私が使用してるIMAPがcourierですので。 この設定によりNO.3 Folder Defaultsのセッティングが自動的に行われます。 Command >> 2 ← 2を入力してEnter。サーバーの設定に移動 SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------- Server Settings General ------- 1. Domain : localhost 2. Invert Time : false 3. Sendmail or SMTP : Sendmail A. Update IMAP Settings : localhost:143 (courier) B. Update SMTP Settings : localhost:25 R Return to Main Menu C. Turn color off S Save data Q Quit Command >>1 ← Domain : e-hiro.netと設定 Command >>3 ← PostfixなのでSMTPを選択 Command >>a ← IMAPの設定に移動 General ------- 1. Domain : e-hiro.net 2. Invert Time : false 3. Sendmail or SMTP : SMTP IMAP Settings -------------- 4. IMAP Server : localhost 5. IMAP Port : 143 6. Authentication type : login 7. Secure IMAP (TLS) : false 8. Server software : cyrus 9. Delimiter : . B. Update SMTP Settings : localhost:25 H. Hide IMAP Server Settings R Return to Main Menu C. Turn color off S Save data Q Quit Command >>8 ← courierを選択 Command >>r ← Main Menuに戻る Command >>s ← 変更を保存 Command >>q ← 設定終了 (補足) 私がインストールした"squirrelmail-ja-1.4.3a-3_rh9.noarch.rpm"は、 日本語を扱うように作成されたものなので、言語の変更は特にしなくても良かったのですが、 念のため言語の設定場所を記しておきます。 SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------- Main Menu -- 1. Organization Preferences 2. Server Settings 3. Folder Defaults 4. General Options 5. Themes 6. Address Books (LDAP) 7. Message of the Day (MOTD) 8. Plugins 9. Database D. Set pre-defined settings for specific IMAP servers C. Turn color off S Save data Q Quit Command >>1 ← Organization Preferences 6. Default Language : ja_JP ← enからja_JPに変更 Command >>4 ← General Options 1. Default Charset : iso-2022-jp ← iso-8859-1からiso-2022-jpに変更 以上の2箇所の変更お願いします。 設定が終わったらhttpdを再起動してください。 # /etc/rc.d/init.d/httpd restart WebMailには、https(SSL暗号化されたページ)でアクセス Webmailのページへのアクセスは強制的にSSL暗号化されたページ(https)にします。 /etc/httpd/conf.d/に設定ファイルを作成します。 私の環境では、httpd.conf内でconf.dディレクトリ内をインクルードする設定をしています。 直接httpd.confに追記しても構いません。 なお、この設定をするにあたって、mod_rewriteがロードされている必要があります。 # cd /etc/httpd/conf.d # vi rewrite.conf # mod_rewrite.conf # # WEBMAIL RewriteEngine on RewriteCond ${HTTPS} !=on RewriteRule ^/webmail(.*)?$ https://%{HTTP_HOST}/webmail$1 [L,R]
Copyright © 2004-2005 E-HIRO.NET. All Rights Reserved.