メインメニュー
Powered By

vine linux4.~
apache2.~
php5.~
Mysql5.~
xoops cube2.~
hp
自宅サーバより発信しています

 TOP  >  Vine linux  >  Webmailの導入
トップ  >  Webmailの導入



将来のために
お手本サイトより転載 一部自サイト用にカスタマイズ(パソコンおやじ&vineで自宅サ−バ−)

※ Webサーバー、PHP、サーバー通信暗号化、メールサーバーが構築済みであることが前提となります。
SquirrelMailのインストール


SquirrelMail(スクイリルメール)日本語バージョン本体と、パッチ当て済みのアーカイブをダウンロード
最新版はこちらを確認

# wget http://www.yamaai-tech.com/~masato/Download/squirrelmail-1.4.5-ja-20050714.tar.gz ← 本体DL

# wget http://www.yamaai-tech.com/~masato/Download/ja_JP-1.4.5-ja-20050714.tar.gz ← アーカイブDL


# cd /var/www/ ← インストールするディレクトリに移動

# tar zxfv /root/squirrelmail-1.4.5-ja-20050714.tar.gz ← 本体展開

# mv squirrelmail-1.4.5-ja webmail ← 展開してできたディレクトリの名前をwebmailに変更

# cd ./webmail ← 移動

# tar zxfv /root/ja_JP-1.4.5-ja-20050714.tar.gz ← アーカイブ展開

# chmod 730 data ← ディレクトリのパーミッション変更

# chown -R apache:apache data ← 所有権をApache(httpd.confに記載)のユーザとグループに変更


ダウンロードしたファイル削除
# rm -f /root/squirrelmail-1.4.5-ja-20050616.tar.gz
# rm -f /root/ja_JP-1.4.5-ja-20050714.tar.gz

SquirrelMailの設定


# cd /var/www/webmail ← 移動

# ./configure ←設定ツール起動

設定ツールが起動すると以下のような画面が表示されます。

使用するIMAPサーバーの設定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> d ← dを指定(IMAPサーバの設定)

SquirrelMail Configuration : Read: config_default.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don\'t work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.

Please select your IMAP server:
cyrus = Cyrus IMAP server
uw = University of Washington\'s IMAP server
exchange = Microsoft Exchange IMAP server
courier = Courier IMAP server
macosx = Mac OS X Mailserver
hmailserver = hMailServer
quit = Do not change anything
Command >> courier ← courierを指定

imap_server_type = courier
default_folder_prefix = INBOX.
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = .
delete_folder = true

Press any key to continue... 「Enter」


ログアウトしたときに表示されるページを指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 1 ← 1を指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name : SquirrelMail
2. Organization Logo : ../images/sm_logo.png
3. Org. Logo Width/Height : (308/111)
4. Organization Title : SquirrelMail $version
5. Signout Page :
6. Top Frame : _top
7. Provider link : http://www.squirrelmail.org/
8. Provider name : SquirrelMail

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 5 ← 5を指定

When users click the Sign Out button they will be logged out and
then sent to signout_page. If signout_page is left empty,
(hit space and then return) they will be taken, as normal,
to the default and rather sparse SquirrelMail signout page.

[]: /webmail ← /webmailを指定(ログアウトしたらログインページに戻るようにする)

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name : SquirrelMail
2. Organization Logo : ../images/sm_logo.png
3. Org. Logo Width/Height : (308/111)
4. Organization Title : SquirrelMail $version
5. Signout Page : /webmail
6. Top Frame : _top
7. Provider link : http://www.squirrelmail.org/
8. Provider name : SquirrelMail

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> r ← メニューに戻る


ドメイン名の設定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 2 ← 2を指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (courier)
B. Update SMTP Settings : localhost:25

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 1 ← 1を指定

The domain name is the suffix at the end of all email addresses. If
for example, your email address is jdoe@example.com, then your domain
would be example.com.

[example.com]: xxxxx.com ← ドメイン名を指定


SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings

General
-------
1. Domain : xxxxx.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (courier)
B. Update SMTP Settings : localhost:25

R Return to Main Menu
C Turn color on
S Save data
Q Quit


Command >> r ← メニューに戻る


言語の設定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 10 ← 10を指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : en_US
2. Default Charset : iso-8859-1
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 1 ← 1を指定

SquirrelMail attempts to set the language in many ways. If it
can not figure it out in another way, it will default to this
language. Please use the code for the desired language.

[en_US]: ja_JP ← 日本語を指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : ja_JP
2. Default Charset : iso-8859-1
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 2 ← 2を指定

This option controls what character set is used when sending
mail and when sending HTML to the browser.

This option is used only when default language is \'en_US\'.

[iso-8859-1]: iso-2022-jp ← iso-2022-jpを指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : ja_JP
2. Default Charset : iso-2022-jp
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> r ← メニューに戻る


SquirrelMailのバージョン非表示化

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 4 ← 4を指定

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : ../data/
2. Attachment Directory : $data_dir
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 7 ← 7を指定

Hide SM attributions (y/n) [n]: y ← yでログインページでSquirrelMailのバージョンを表示しないようにする

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : ../data/
2. Attachment Directory : $data_dir
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : true
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> q ← 終了

You have not saved your data.
Save? [Y/n]: y ← 保存


必須プラグインの導入

プラグインの説明
Compatibility → プラグインを全てのバージョンのSquirrelMailでそのまま動くようにする。
Empty → Trash(ゴミ箱フォルダ)を自動的に空にする。
Secure → ログイン時に自動的にhttps(SSL)でアクセスする。


# cd ← rootディレクトリに戻る

プラグインのダウンロード

# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-1.3.tar.gz

# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fempty_trash-1.2-1.2.2.tar.gz

# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fsecure_login-1.2-1.2.8.tar.gz


# cd /var/www/webmail/plugins/ ← プラグインディレクトリに移動

# tar zxvf /root/compatibility-1.3.tar.gz ← compatibilityを解凍

# tar zxvf /root/empty_trash-1.2-1.2.2.tar.gz ← empty_trashを解凍

# tar zxvf /root/secure_login-1.2-1.2.8.tar.gz ← secure_loginを解凍


# rm -f /root/compatibility-1.3.tar.gz ← ダウンロードしたファイル削除

# rm -f /root/empty_trash-1.2-1.2.2.tar.gz ← ダウンロードしたファイル削除

# rm -f /root/secure_login-1.2-1.2.8.tar.gz ← ダウンロードしたファイル削除


# cd /var/www/webmail ← 移動

# ./configure ← 設定ツール起動

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
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> 8 ← 8を指定

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins

Available Plugins:
1. info
2. translate
3. squirrelspell
4. spamcop
5. filters
6. calendar
7. abook_take
8. fortune
9. administrator
10. newmail
11. bug_report
12. sent_subfolders
13. mail_fetch
14. listcommands
15. message_details
16. delete_move_next
17. compatibility
18. empty_trash
19. secure_login

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 17 ← compatibilityの番号を選択(番号は環境によって異なります)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. compatibility

Available Plugins:
2. info
3. translate
4. squirrelspell
5. spamcop
6. filters
7. calendar
8. abook_take
9. fortune
10. administrator
11. newmail
12. bug_report
13. sent_subfolders
14. mail_fetch
15. listcommands
16. message_details
17. delete_move_next
18. empty_trash
19. secure_login

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 18 ← empty_trashの番号を選択(番号は環境によって異なります)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. compatibility
2. empty_trash

Available Plugins:
3. info
4. translate
5. squirrelspell
6. spamcop
7. filters
8. calendar
9. abook_take
10. fortune
11. administrator
12. newmail
13. bug_report
14. sent_subfolders
15. mail_fetch
16. listcommands
17. message_details
18. delete_move_next
19. secure_login

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> 19 ← secure_loginの番号を選択(番号は環境によって異なります)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. compatibility
2. empty_trash
3. secure_login

Available Plugins:
4. info
5. translate
6. squirrelspell
7. spamcop
8. filters
9. calendar
10. abook_take
11. fortune
12. administrator
13. newmail
14. bug_report
15. sent_subfolders
16. mail_fetch
17. listcommands
18. message_details
19. delete_move_next

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Command >> q ← 終了

You have not saved your data.
Save? [Y/n]: y ← 保存
Data saved in config.php

Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!

設定が終了したら下記を確認してください。

http://サーバーIPアドレス/webmail/にアクセスしてSquirrelMailログインページが表示されていればOKです。

また、URLがhttps://サーバーIPアドレス/webmail/src/login.php?secure_login=yesとなっているか確認して下さい。


クライアント認証用の ca.derの作り方&配布のしかた

CA証明書をブラウザにインポートするためのca.derファイルの作成
(あらかじめ同一フォルダ−に移動しておく # cd
***.pemファィルも同じ場所に。
*****は任意名でよし


# openssl x509 -inform pem -in *****.pem -outform der -out *****.der




以下のcgiを作り同じフォルダ−内に **.derファィルを置いておく

#!/bin/sh
echo \"Content-type: application/x-x509-ca-cert\"
echo \"Content-Disposition: attachment; filename=*****.der\"
echo
cat *****.der
前
DNS reportで出る赤や黄色
カテゴリートップ
vine linux 覚え書き
次
サーバーの通信暗号化


Powered by XOOPS Cube Legacy 2.2 © 2001-2013 The XOOPS Cube Project  .