■概要

HotmailやYahoo!メールのようにWebブラウザ上でメールができるWebmailシステムであるSquirrelMailを導入する。
ただし、CentOS標準のSquirrelMailは日本語の扱いに問題(メール件名、添付ファイル名、メール本文等における一部の日本語が文字化けする、日付形式が「XX月月XX日」のように表示される)があるため、本家からダウンロードしたものに日本語修正パッチを適用してインストールする。
なお、Webmailログオン時はユーザ名/パスワードを盗聴されないようにするため、自動的にhttps://~でアクセスするようにする。

WebサーバーWebサーバー間通信内容暗号化、メールサーバー(sendmail編Postfix編qmail編)が構築済であること


■SquirrelMailインストール

[root@centos ~]# wget http://jaist.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.13.tar.bz2
 ← SquirrelMailダウンロード

※最新版のURLはダウンロードページで確認すること

[root@centos ~]# wget http://www.yamaai-tech.com/~masato/Download/squirrelmail-1.4.13-ja-20071215-patch.gz
 ← SquirrelMail日本語パッチダウンロード

※最新版のURLはダウンロードページで確認すること

[root@centos ~]# tar jxvf squirrelmail-1.4.13.tar.bz2 ← SquirrelMail展開

[root@centos ~]# cd squirrelmail-1.4.13 ← SquirrelMail展開先ディレクトリへ移動

[root@centos squirrelmail-1.4.13]# zcat ../squirrelmail-1.4.13-ja-20071215-patch.gz| patch -p1 ← SquirrelMail日本語パッチ施工

[root@centos squirrelmail-1.4.13]# cd ← ホームディレクトリへ戻る

[root@centos ~]# mv squirrelmail-1.4.13 /var/www/webmail ← SquirrelMail展開先ディレクトリを所定の場所へリネーム移動

[root@centos ~]# rm -f squirrelmail-1.4.13.tar.bz2 ← ダウンロードしたSquirrelMailを削除

[root@centos ~]# rm -f squirrelmail-1.4.13-ja-20071215-patch.gz ← SquirrelMail日本語パッチ削除

[root@centos ~]# wget http://jaist.dl.sourceforge.net/sourceforge/squirrelmail/all_locales-1.4.13-20071220.zip
 ← localeダウンロード

※最新版のURLはダウンロードページで確認すること

[root@centos ~]# unzip all_locales-1.4.13-20071220.zip -d all_locales ← locale展開

[root@centos ~]# cd all_locales ← locale展開先ディレクトリへ移動

[root@centos all_locales]# rm -rf /var/www/webmail/help/ ← デフォルトのhelpを削除

[root@centos all_locales]# ./install ← localeインストール
Please enter path to your squirrelmail installation:/var/www/webmail ← SquirrelMailインストール先を応答

[root@centos all_locales]# cd ← ホームディレクトリへ戻る

[root@centos ~]# rm -rf all_locales ← locale展開先ディレクトリを削除

[root@centos ~]# rm -f all_locales-1.4.13-20071220.zip ← ダウンロードしたlocaleを削除

[root@centos ~]# cd /var/www/webmail/po/ ← ディレクトリ移動

[root@centos po]# ./compilepo ja_JP ← squirrelmail.poファイル作成
Compiling ../locale/ja_JP/LC_MESSAGES/squirrelmail.po

[root@centos po]# cd ← ホームディレクトリへ戻る

[root@centos ~]# chmod 730 /var/www/webmail/data/ ← dataディレクトリのパーミッション変更

[root@centos ~]# chown -R apache:apache /var/www/webmail/data/ ← dataディレクトリの所有者変更

■SquirrelMail設定

(1)基本設定
[root@centos ~]# /var/www/webmail/config/conf.pl ← 設定スクリプト実行
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 >> 10 ← Languages選択

SquirrelMail Configuration : Read: config.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 ← Default Language選択

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 ← ja_JP応答

SquirrelMail Configuration : Read: config.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 ← Default Charset選択

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.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 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 off
S   Save data
Q   Quit

Command >> 1 ← Organization Preferences選択

SquirrelMail Configuration : Read: config.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 off
S   Save data
Q   Quit

Command >> 5 ← Signout Page選択

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.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 off
S   Save data
Q   Quit

Command >> r ← 戻る

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 off
S   Save data
Q   Quit

Command >> 2 ← Server Settings選択

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 (uw)
B.  Change Sendmail Config : /usr/sbin/sendmail

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

Command >> 1 ← Domain選択

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.

[localhost]: wakuwakustation.com ← ドメイン名応答(wakuwakustation.comは当サイトの例)

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

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

A.  Update IMAP Settings   : localhost:143 (uw)
B.  Change Sendmail Config : /usr/sbin/sendmail

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

Command >> r ← 戻る

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 off
S   Save data
Q   Quit

Command >> 4 ← General Options選択

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1.  Data Directory              : /var/lib/squirrelmail/prefs/
2.  Attachment Directory        : /var/spool/squirrelmail/attach/
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/true
10. Allow server thread sort    : true
11. Allow server-side sorting   : true
12. Allow server charset search : true
13. Enable UID support          : true
14. PHP session name            : SQMSESSID

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

Command >> 7 ← Hide SM attributions選択


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

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1.  Data Directory              : /var/local/squirrelmail/data/
2.  Attachment Directory        : /var/local/squirrelmail/attach/
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
15. Location base               : 

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

Command >> 1 ← Data Directory選択

Specify the location for your data directory.
The path name can be absolute or relative (to the config directory).
You probably need to create this directory yourself. Here are two examples:
  Absolute:    /var/local/squirrelmail/data/
  Relative:    ../data/
Relative paths to directories outside of the SquirrelMail distribution
will be converted to their absolute path equivalents in config.php.

Note: There are potential security risks with having a writable directory
under the web server's root directory (ex: /home/httpd/html).
For this reason, it is recommended to put the data directory
in an alternate location of your choice. 

[/var/local/squirrelmail/data/]: ../data/ ← ../data/応答

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1.  Data Directory              : ../data/
2.  Attachment Directory        : /var/local/squirrelmail/attach/
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
15. Location base               : 

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

Command >> 2 ← Attachment Directory選択

Path to directory used for storing attachments while a mail is
being sent. The path name can be absolute or relative (to the config directory).
It doesn't matter.  Here are two examples:
  Absolute:    /var/spool/squirrelmail/attach/
  Relative:    ../attach/
Relative paths to directories outside of the SquirrelMail distribution
will be converted to their absolute path equivalents in config.php.

Note:  There are a few security considerations regarding this
directory:
  1.  It should have the permission 733 (rwx-wx-wx) to make it
      impossible for a random person with access to the webserver
      to list files in this directory.  Confidential data might
      be laying around in there.
      Depending on your user:group assignments, 730 (rwx-wx---)
      may be possible, and more secure (e.g. root:apache)
  2.  Since the webserver is not able to list the files in the
      content is also impossible for the webserver to delete files
      lying around there for too long.
  3.  It should probably be another directory than the data
      directory specified in option 3.

[/var/local/squirrelmail/attach/]: $data_dir ← $data_dir応答

SquirrelMail Configuration : Read: config.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
15. Location base               : 

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

Command >> r ← 戻る

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 >> 3 ← Folder Defaults選択

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Folder Defaults
1.  Default Folder Prefix         : 
2.  Show Folder Prefix Option     : false
3.  Trash Folder                  : INBOX.Trash
4.  Sent Folder                   : INBOX.Sent
5.  Drafts Folder                 : INBOX.Drafts
6.  By default, move to trash     : true
7.  By default, move to sent      : true
8.  By default, save as draft     : true
9.  List Special Folders First    : true
10. Show Special Folders Color    : true
11. Auto Expunge                  : true
12. Default Sub. of INBOX         : true
13. Show 'Contain Sub.' Option    : false
14. Default Unseen Notify         : 2
15. Default Unseen Type           : 1
16. Auto Create Special Folders   : true
17. Folder Delete Bypasses Trash  : false
18. Enable /NoSelect folder fix   : false

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

Command >> 3 ← Trash Folder選択

You can now specify where the default trash folder is located.
On servers where you do not want this, you can set it to anything
and set option 6 to false.

This is relative to where the rest of your email is kept.  You do
not need to worry about their mail directory.  If this folder
would be ~/mail/trash on the filesystem, you only need to specify
that this is 'trash', and be sure to put 'mail/' in option 1.

[INBOX.Trash]: Trash ← Trash応答

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Folder Defaults
1.  Default Folder Prefix         : 
2.  Show Folder Prefix Option     : false
3.  Trash Folder                  : Trash
4.  Sent Folder                   : INBOX.Sent
5.  Drafts Folder                 : INBOX.Drafts
6.  By default, move to trash     : true
7.  By default, move to sent      : true
8.  By default, save as draft     : true
9.  List Special Folders First    : true
10. Show Special Folders Color    : true
11. Auto Expunge                  : true
12. Default Sub. of INBOX         : true
13. Show 'Contain Sub.' Option    : false
14. Default Unseen Notify         : 2
15. Default Unseen Type           : 1
16. Auto Create Special Folders   : true
17. Folder Delete Bypasses Trash  : false
18. Enable /NoSelect folder fix   : false

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

Command >> 4 ← Sent Folder選択

This is where messages that are sent will be stored.  SquirrelMail
by default puts a copy of all outgoing messages in this folder.

This is relative to where the rest of your email is kept.  You do
not need to worry about their mail directory.  If this folder
would be ~/mail/sent on the filesystem, you only need to specify
that this is 'sent', and be sure to put 'mail/' in option 1.

[INBOX.Sent]: Sent ← Sent応答

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Folder Defaults
1.  Default Folder Prefix         : 
2.  Show Folder Prefix Option     : false
3.  Trash Folder                  : Trash
4.  Sent Folder                   : Sent
5.  Drafts Folder                 : INBOX.Drafts
6.  By default, move to trash     : true
7.  By default, move to sent      : true
8.  By default, save as draft     : true
9.  List Special Folders First    : true
10. Show Special Folders Color    : true
11. Auto Expunge                  : true
12. Default Sub. of INBOX         : true
13. Show 'Contain Sub.' Option    : false
14. Default Unseen Notify         : 2
15. Default Unseen Type           : 1
16. Auto Create Special Folders   : true
17. Folder Delete Bypasses Trash  : false
18. Enable /NoSelect folder fix   : false

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

Command >> 5 ← Drafts Folder選択

You can now specify where the default draft folder is located.
On servers where you do not want this, you can set it to anything
and set option 9 to false.

This is relative to where the rest of your email is kept.  You do
not need to worry about their mail directory.  If this folder
would be ~/mail/drafts on the filesystem, you only need to specify
that this is 'drafts', and be sure to put 'mail/' in option 1.

[INBOX.Drafts]: Drafts ← Drafts応答

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Folder Defaults
1.  Default Folder Prefix         : 
2.  Show Folder Prefix Option     : false
3.  Trash Folder                  : Trash
4.  Sent Folder                   : Sent
5.  Drafts Folder                 : Drafts
6.  By default, move to trash     : true
7.  By default, move to sent      : true
8.  By default, save as draft     : true
9.  List Special Folders First    : true
10. Show Special Folders Color    : true
11. Auto Expunge                  : true
12. Default Sub. of INBOX         : true
13. Show 'Contain Sub.' Option    : false
14. Default Unseen Notify         : 2
15. Default Unseen Type           : 1
16. Auto Create Special Folders   : true
17. Folder Delete Bypasses Trash  : false
18. Enable /NoSelect folder fix   : false

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

Command >> q ← q応答(設定スクリプト終了)

You have not saved your data.
Save?  [Y/n]: y ← 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!

(2)必須プラグインの導入
Compatibilityプラグイン:プラグインを全てのバージョンのSquirrelMailでそのまま動くようにする。
Empty Trashプラグイン:ゴミ箱フォルダを自動的に空にする。
Secure Loginプラグイン:ログイン時に自動的にhttps(SSL)でアクセスする。
[root@centos ~]# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-2.0.11-1.0.tar.gz
 ← compatibilityプラグインダウンロード※
※最新版のURLはダウンロードページで確認すること

[root@centos ~]# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fempty_trash-1.4-1.2.2.tar.gz
 ← Empty Trashプラグインダウンロード※
※最新版のURLはダウンロードページで確認すること

[root@centos ~]# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fsecure_login-1.3-1.2.8.tar.gz
 ← secure_loginプラグインダウンロード※
※最新版のURLはダウンロードページで確認すること

[root@centos ~]# cd /var/www/webmail/plugins/ ← SquirrelMailプラグインディレクトリへ移動

[root@centos plugins]# tar zxvf /root/compatibility-2.0.11-1.0.tar.gz ← ダウンロードしたcompatibilityを解凍

[root@centos plugins]# tar zxvf /root/empty_trash-1.4-1.2.2.tar.gz ← ダウンロードしたempty_trashを解凍

[root@centos plugins]# tar zxvf /root/secure_login-1.3-1.2.8.tar.gz ← ダウンロードしたsecure_loginを解凍

[root@centos plugins]# rm -f /root/compatibility-2.0.11-1.0.tar.gz ← ダウンロードしたcompatibilityを削除

[root@centos plugins]# rm -f /root/empty_trash-1.4-1.2.2.tar.gz ← ダウンロードしたempty_trashを削除

[root@centos plugins]# rm -f /root/secure_login-1.3-1.2.8.tar.gz ← ダウンロードしたsecure_loginを削除

[root@centos plugins]# cp empty_trash/config.php.sample empty_trash/config.php ← empty_trash設定ファイル作成

[root@centos plugins]# cp secure_login/config.sample.php secure_login/config.php ← secure_login設定ファイル作成

[root@centos plugins]# vi secure_login/config.php ← secure_login設定ファイル編集
   $change_back_to_http_after_login = 0; ← 0へ変更(ログイン後もSSL通信を継続)

[root@centos plugins]# /var/www/webmail/config/conf.pl ← SquirrelMail設定スクリプト実行
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 off
S   Save data
Q   Quit

Command >> 8 ← Plugins選択

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. delete_move_next
    2. squirrelspell
    3. newmail

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

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

Command >> 4 ← compatibilityの番号を選択(番号は環境によって異なる)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. delete_move_next
    2. squirrelspell
    3. newmail
    4. compatibility

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

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

Command >> 12 ← empty_trashの番号を選択(番号は環境によって異なる)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. delete_move_next
    2. squirrelspell
    3. newmail
    4. compatibility
    5. empty_trash

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

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

Command >> 18 ← secure_loginの番号を選択(番号は環境によって異なる)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. delete_move_next
    2. squirrelspell
    3. newmail
    4. compatibility
    5. empty_trash
    6. secure_login

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

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

Command >> q ← q応答(設定スクリプト終了)

You have not saved your data.
Save?  [Y/n]: y ← 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!

(3)添付ファイルサイズ拡大
ここでは、例として添付ファイルサイズを10MBに拡大する。
[root@centos ~]# vi /etc/postfix/main.cf ← Postfix設定ファイル編集
message_size_limit = 20971520 ← メールサイズ上限を20MB(20*1024*1024)にする
※message_size_limitには添付ファイルサイズ×2ぐらいのサイズを指定しておくこと

[root@centos ~]# /etc/rc.d/init.d/postfix reload ← Postfix設定反映
postfix を再読み込み中:                                    [  OK  ]

[root@centos ~]# vi /etc/php.ini ← php設定ファイル編集
upload_max_filesize = 10M ← 添付ファイルサイズを10MBにする

post_max_size = 10M ← 添付ファイルサイズを10MBにする

[root@centos ~]# /etc/rc.d/init.d/httpd reload ← Apache(php)設定反映

■Apache設定

(1)Apache設定
[root@centos ~]# vi /etc/httpd/conf.d/webmail.conf ← SquirrelMail用Apache設定ファイル作成
Alias /webmail /var/www/webmail
<Directory /var/www/webmail>
    AllowOverride Limit
</Directory>

[root@centos ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中:                                      [  OK  ]

(2)PHPエラー対処
SquirrelMailアクセス時に以下のエラーメッセージが表示される場合の対処
You need to have php4 installed with the multibyte string function enabled (using configure option --with-mbstring).
[root@centos ~]# vi /etc/php.ini ← php設定ファイル編集
;mbstring.language = Japanese
↓
mbstring.language = Japanese ← 行頭の;を削除(コメント解除)

;mbstring.internal_encoding = EUC-JP
↓
mbstring.internal_encoding = EUC-JP ← 行頭の;を削除(コメント解除)

;mbstring.http_input = auto
↓
mbstring.http_input = auto ← 行頭の;を削除(コメント解除)

;mbstring.http_output = SJIS
↓
mbstring.http_output = SJIS ← 行頭の;を削除(コメント解除)

;mbstring.encoding_translation = Off
↓
mbstring.encoding_translation = Off ← 行頭の;を削除(コメント解除)

;mbstring.detect_order = auto
↓
mbstring.detect_order = auto ← 行頭の;を削除(コメント解除)

;mbstring.substitute_character = none;
↓
mbstring.substitute_character = none; ← 行頭の;を削除(コメント解除)

;mbstring.func_overload = 0
↓
mbstring.func_overload = 0 ← 行頭の;を削除(コメント解除)

[root@centos ~]# /etc/rc.d/init.d/httpd reload ← Webサーバーをリロード
httpd を再読み込み中:                                      [  OK  ]

■SquirrelMail確認

http://サーバー名/webmail/にアクセスしてSquirrelMailログインページが表示されることを確認。
また、URLがhttps://サーバー名/webmail/src/login.php?secure_login=yesとなっていることを確認。

※ログイン名にはメールアカウント名(例:centos)、パスワードにはメールアカウントパスワードを入力する。
ただし、バーチャルドメイン設定(vpopmail)を導入している場合は、ログイン名にはメールアドレス(例:centos@virtual.com)を入力すること