Webmailシステム構築(SquirrelMail)

最終更新日: 2014.02.19

<<トップページ <<新着情報 <<サイト内検索 <<CentOSで自宅サーバー構築 <<Scientific Linuxで自宅サーバー構築

■概要

HotmailやYahoo!メールのようにWebブラウザ上でメールができるWebmailシステムであるSquirrelMailを導入する。
なお、Webmailアクセス時はユーザ名/パスワードおよびメール内容を盗み見されないようにするため、自動的にhttps://〜でアクセスするようにする。

WebサーバーWebサーバー間通信内容暗号化メールサーバー(受信メールサーバーはIMAP)が構築済であること


■SquirrelMailインストール

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

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

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

[root@fedora ~]# mv squirrelmail-1.4.21 /var/www/webmail ← SquirrelMail展開先ディレクトリをリネーム移動

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

[root@fedora ~]# mkdir -p work ; cd work ← ワークディレクトリ作成&カレントディレクトリ移動

[root@fedora work]# wget http://jaist.dl.sourceforge.net/sourceforge/squirrelmail/ja_JP-1.4.18-20090526.tar.bz2 ← localeダウンロード

[root@fedora work]# tar jxvf ja_JP-1.4.18-20090526.tar.bz2 ← locale展開

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

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

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

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

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

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

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

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

[root@fedora ~]# vi /var/www/webmail/functions/i18n.php ← i18n.php
        case 'decodeheader':
            $ret = str_replace("\t", "", $ret);
            if (preg_match('/=\?([^?]+)\?(q|b)\?([^?]+)\?=/i', $ret))
                $ret = @mb_decode_mimeheader($ret);
            //$ret = @mb_convert_encoding($ret, 'EUC-JP', 'AUTO'); ← 行頭に//を入れてコメントアウト
            $ret = @mb_convert_encoding($ret, 'EUC-JP', 'ASCII,JIS,EUC-JP,UTF-8,SJIS'); ← 追加(差出人文字化け対処)
            break;
        case 'downloadfilename':
            $useragent = func_get_arg(2);
            if (strstr($useragent, 'Windows') !== false ||
                strstr($useragent, 'Mac_') !== false) {
                //$ret = mb_convert_encoding($ret, 'SJIS', 'AUTO'); ← 行頭に//を入れてコメントアウト
                $ret = mb_convert_encoding($ret, 'UTF-8', 'AUTO'); ← 追加(添付ファイル名文字化け対処)
            } else {
                $ret = mb_convert_encoding($ret, 'EUC-JP', 'AUTO');
}
            break;

■SquirrelMail設定

(1)基本設定
[root@fedora ~]# /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]: fedorasrv.com ← ドメイン名応答(fedorasrv.comは当サイトの例)

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

General
-------
1.  Domain                 : fedorasrv.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                : 
16. Only secure cookies if poss. : true

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

Command >> 16 ← Only secure cookies if poss選択

This option allows you to specify that if a user session is initiated
under a secure (HTTPS, SSL-encrypted) connection, the cookies given to
the browser will ONLY be transmitted via a secure connection henceforth.

Generally this is a Good Thing, and should NOT be disabled.  However,
if you intend to use the Secure Login or Show SSL Link plugins to
encrypt the user login, but not the rest of the SquirrelMail session,
this can be turned off.  Think twice before doing so.

Transmit cookies only on secure connection when available? (y/n) [y]: n ← n応答(Secure Loginプラグインによるログイン不可対処)

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でそのまま動くようにする。
Secure Loginプラグイン:ログイン時に自動的にhttps(SSL)でアクセスする。
[root@fedora ~]# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-2.0.16-1.0.tar.gz ← compatibilityプラグインダウンロード

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

[root@fedora ~]# tar zxvf compatibility-2.0.16-1.0.tar.gz ← compatibilityプラグイン展開

[root@fedora ~]# mv compatibility /var/www/webmail/plugins/ ← compatibilityプラグイン移動

[root@fedora ~]# rm -f compatibility-2.0.16-1.0.tar.gz ← ダウンロードしたファイルを削除

[root@fedora ~]# wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fsecure_login-1.4-1.2.8.tar.gz ← secure_loginプラグインダウンロード

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

[root@fedora ~]# tar zxvf secure_login-1.4-1.2.8.tar.gz ← secure_loginプラグイン展開

[root@fedora ~]# mv secure_login /var/www/webmail/plugins/ ← secure_loginプラグイン移動

[root@fedora ~]# rm -f secure_login-1.4-1.2.8.tar.gz ← ダウンロードしたファイルを削除

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

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

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

[root@fedora secure_login]# cd ← ホームディレクトリへ移動

[root@fedora ~]# /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

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

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

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

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

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

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

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

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

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

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!

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

[root@fedora ~]# /etc/rc.d/init.d/postfix reload ← Postfix設定反映
Reloading postfix configuration (via systemctl):           [  OK  ]

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

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

[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache(php)設定反映
Reloading httpd configuration (via systemctl):             [  OK  ]

■Apache設定

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

[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
Reloading httpd configuration (via systemctl):             [  OK  ]

■SquirrelMail確認

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

※ログイン名にはメールアカウント名(例:fedora)、パスワードにはメールアカウントパスワードを入力する


■関連コンテンツ




▲このページのトップへ戻る

プライバシーポリシー