// Absolute path to a local mime.types mapping table file.
// This is used to derive mime-types from the filename extension or vice versa.
// Such a file is usually part of the apache webserver. If you don't find a file named mime.types on your system,// download it from http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types$config['mime_types'] = '/var/www/roundcube/config/mime.types'; // <= 変更(mime.types の位置を指定)
# mysql -u root -p
Enter password: # <= root パスワード
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.0.16-MariaDB-1-log (Debian)
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE roundcubemail; # <= roundcubemail データベース作成
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY '任意のパスワード';
# <= ユーザ roundcube 作成
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES; # <= 即時反映
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit # <= ログアウト
Bye
5. データベースの初期化
用意されている SQL ファイルを使用してデータベース roundcubemail を初期化する。
12
# mysql -u roundcube -p roundcubemail < /var/www/roundcube/SQL/mysql.initial.sql
Enter password: # <= roundcube ユーザのパスワード
// This domain will be used to form e-mail addresses of new users// Specify an array with 'host' => 'domain' values to support multiple hosts// Supported replacement variables:// %h - user's IMAP hostname// %n - http hostname ($_SERVER['SERVER_NAME'])// %d - domain (http hostname without the first part)// %z - IMAP domain (IMAP hostname without the first part)// For example %n = mail.domain.tld, %t = domain.tld$config['mail_domain']='mk-mode.com';# <= 変更 (送信元メールアドレスのドメインを指定)// Use this charset as fallback for message decoding$$config['default_charset']='ISO-2022-1';# <= 変更(日本語対応)// enforce connections over https// with this option enabled, all non-secure connections will be redirected.// set the port for the ssl connection as value of this option if it differs from the default 443$config['force_https']=true;# <= 変更(https アクセス(SSL)の強制)// the way how contact names are displayed in the list// 0: display name// 1: (prefix) firstname middlename surname (suffix)// 2: (prefix) surname firstname middlename (suffix)// 3: (prefix) surname, firstname middlename (suffix)$config['addressbook_name_listing']=2;# <= 変更(アドレス帳での表示を姓名形式に)// Set true if deleted messages should not be displayed$// This will make the application run slower$$config['skip_deleted']=true;# <= 変更(削除済みメッセージを非表示)
8. Nginx 設定ファイルの編集
https://サーバー名/roundcube/ で Web メールへアクセスできるようにするために、Nginx 設定ファイル server ディレクティブ(SSL 設定側)内に以下のように追記する。