「Roundcube」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(Pkg/AUR テンプレートの更新)
(同じ利用者による、間の8版が非表示)
5行目: 5行目:
   
 
== インストール ==
 
== インストール ==
{{pkg|roundcubemail}} パッケージを[[インストール]]してください。さらにデータベース ([[MariaDB]] など) と [[PHP]] が動作する[[:カテゴリ:ウェブサーバー|ウェブサーバー]] ([[Apache HTTP Server]] など) が必要です。
+
{{pkg|roundcubemail}} パッケージを[[インストール]]してください。さらにデータベース ([[MariaDB]] など) と [[PHP]] が動作する[[:カテゴリ:ウェブサーバー|ウェブサーバー]]が必要です。
   
 
== 設定 ==
 
== 設定 ==
   
=== データベース ===
+
=== MariaDB ===
 
==== MariaDB ====
 
   
 
以下は [[MariaDB]] を使って Roundcube のデータベースをセットアップする例です。データベースの名前は {{ic|roundcubemail}} で、ユーザーは {{ic|roundcube}} でパスワードは {{ic|password}} とします:
 
以下は [[MariaDB]] を使って Roundcube のデータベースをセットアップする例です。データベースの名前は {{ic|roundcubemail}} で、ユーザーは {{ic|roundcube}} でパスワードは {{ic|password}} とします:
24行目: 22行目:
 
$ mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/SQL/mysql.initial.sql
 
$ mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/SQL/mysql.initial.sql
   
==== SQLite ====
+
=== SQLite ===
   
SQLite のデータベースは Roundcube によって自動的に作成されます。設定ファイルに指定ディレクトリが {{ic|basedir}} に含まれていることを確認してください。{{ic|/var/lib/roundcubemail}} を定義に追加して、ディレクトリを作成、所有者を {{ic|http}} にすると良いでょう
+
[[SQLite]] DB は Roundcube によって自動的に作成されます。設定に指定されファイルが {{ic|basedir}} に配置されていることを確認してください。basedir定義に {{ic|/var/lib/roundcubemail}} を追加することを検討してください。これは、ディレクトリを作成、{{ic|http}} に [[chown]] するを意味ます
   
==== 他のデータベース ====
+
=== 他のデータベース ===
   
 
Roundcubemail には MS SQL, Oracle, [[PostgreSQL]] のインストールスクリプトが存在します。
 
Roundcubemail には MS SQL, Oracle, [[PostgreSQL]] のインストールスクリプトが存在します。
36行目: 34行目:
 
サンプル設定ファイルをコピーして必要に応じて修正してください:
 
サンプル設定ファイルをコピーして必要に応じて修正してください:
   
# cp /etc/webapps/roundcubemail/config/config.inc.php.sample /etc/webapps/roundcubemail/config/config.inc.php
+
# cd /etc/webapps/roundcubemail/config
  +
# cp config.inc.php.sample config.inc.php
  +
# chown http:http config.inc.php
   
 
メールサーバーの設定を行って、{{ic|enable_installer}} を設定してセットアップウィザードを有効化してください:
 
メールサーバーの設定を行って、{{ic|enable_installer}} を設定してセットアップウィザードを有効化してください:
48行目: 48行目:
 
$config['enable_installer'] = true;
 
$config['enable_installer'] = true;
 
</nowiki>}}
 
</nowiki>}}
  +
  +
Roundcube がファイル名拡張子から MIME タイプを検出できるようにするには、roundcube が mime.types ファイルを指すようにする必要があります。通常、Apache にはこれが付属しています。
  +
  +
# cp /etc/httpd/conf/mime.types /etc/webapps/roundcubemail/config/mime.types
  +
# chown http:http /etc/webapps/roundcubemail/config/mime.types
  +
  +
{{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki>
  +
$config['mime_types'] = RCUBE_INSTALL_PATH . 'config/mime.types';
  +
</nowiki>}}
  +
  +
Apache を使用していない場合は、{{ic|/etc/webapps/roundcubemail/config/defaults.inc.php}} で入手可能な情報を確認してください。
   
 
=== PHP ===
 
=== PHP ===
62行目: 73行目:
 
{{ic|php.ini}} で {{ic|open_basedir}} を設定している場合、PHP から Roundcube のファイルが開けるように {{ic|/etc/webapps}} と {{ic|/usr/share/webapps}} が含まれていることを確認してください。{{ic|open_basedir}} を無効化・コメントアウトしている場合 (デフォルト設定)、何もする必要はありません。
 
{{ic|php.ini}} で {{ic|open_basedir}} を設定している場合、PHP から Roundcube のファイルが開けるように {{ic|/etc/webapps}} と {{ic|/usr/share/webapps}} が含まれていることを確認してください。{{ic|open_basedir}} を無効化・コメントアウトしている場合 (デフォルト設定)、何もする必要はありません。
   
=== ウェブサーバー ===
+
=== ウェブサーバー (Apache) ===
 
==== Apache ====
 
   
 
Apache の設定を設定ディレクトリにコピーしてください:
 
Apache の設定を設定ディレクトリにコピーしてください:
78行目: 87行目:
 
その後 Apache ({{ic|httpd.service}}) を再起動してください。
 
その後 Apache ({{ic|httpd.service}}) を再起動してください。
   
  +
{{Note|[[Apache HTTP Server#php-fpm と mod_proxy_fcgi を使う|php-fpm]] を使用している場合は、{{ic|php_admin_value open_basedir}} 行を削除します。削除しないと、ページにアクセスできなくなります。}}
==== Nginx ====
 
   
  +
=== ウェブサーバー (Nginx) ===
{{Note|
 
  +
* 以下はサブディレクトリで Roundcube を実行する設定例です。
 
  +
{{Warning|これは、Web ルートのサブディレクトリで実行されている RoundCube の設定例であり、複数のソースからの情報を用いた実験に基づいてコンパイルされています。注意して進めてください。}}
* 以下の設定は [[Nginx#PHP を動かす|php-fpm]] が動作するように [[nginx]] サーバーを設定していることが前提です。}}
 
  +
  +
{{Note|これは、[[Nginx#FastCGI|php-fpm]] を使用して [[nginx]] サーバーがすでにセットアップされていることを前提としています。}}
   
 
Roundcube の location ブロックを追加してください:
 
Roundcube の location ブロックを追加してください:
   
{{hc|/etc/nginx.conf|<nowiki>
+
{{hc|/etc/nginx/nginx.conf|<nowiki>
 
location /webmail {
 
location /webmail {
 
alias /usr/share/webapps/roundcubemail;
 
alias /usr/share/webapps/roundcubemail;
124行目: 135行目:
 
log_not_found off;
 
log_not_found off;
 
}
 
}
#Roundcube fastcgi config
+
# Roundcube fastcgi config
 
location ~ /webmail(/.*\.php)$ {
 
location ~ /webmail(/.*\.php)$ {
 
include fastcgi.conf;
 
include fastcgi.conf;
130行目: 141行目:
 
fastcgi_split_path_info ^/webmail/(.+\.php)(/.*)$;
 
fastcgi_split_path_info ^/webmail/(.+\.php)(/.*)$;
 
fastcgi_index index.php;
 
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail/$fastcgi_script_name;
+
fastcgi_param SCRIPT_FILENAME $request_filename;
 
fastcgi_param PATH_INFO $fastcgi_path_info;
 
fastcgi_param PATH_INFO $fastcgi_path_info;
 
fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail";
 
fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail";
137行目: 148行目:
 
</nowiki>}}
 
</nowiki>}}
   
  +
Roundcube のより新しいバージョンでは、{{ic|fastcgi_split_path_info}} と {{ic|fastcgi_param PATH_INFO}} を手動で設定すると、Roundcube が誤動作する原因となりました。{{ic|$request_filename}} も機能しませんでした。 解決策としては以下のような設定が必要です。
その後 {{ic|nginx.service}} を[[再起動]]してください。
 
  +
  +
location ~ /webmail/?$ {
  +
include fastcgi.conf;
  +
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
  +
fastcgi_index index.php;
  +
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail/index.php;
  +
fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/var/lib/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail:/var/lib/roundcubemail";
  +
}
  +
  +
別の設定を使用するには、インストーラーにアクセスするために location block が必要になります:
  +
  +
{{Warning|この {{ic|installer}} ロケーションブロックは 1 回だけ使用する必要があるため、インストール後に削除する必要があります。また、インストール手順でのみ使用されるため、インストール後に {{ic|/usr/share/webapps/roundcubemail/installer/}} ディレクトリを削除した方が安全です。[[#Roundcube のインストール|Roundcube のインストール]] で説明されているように、{{ic|1=$config['enable_installer'] = true;}} を {{ic|config.inc.php}} から削除するだけで十分な場合があります。}}
  +
  +
location ~ /webmail/installer/?.*$ {
  +
include fastcgi.conf;
  +
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
  +
fastcgi_index index.php;
  +
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail/installer/index.php;
  +
fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/var/lib/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail:/var/lib/roundcubemail";
  +
}
  +
  +
その後 {{ic|nginx.service}} を [[再起動]] してください。
  +
  +
{{Note|パスワードプラグインを使用する場合は、{{ic|/dev/null}} も {{ic|open_basedir}} リストに追加してください。}}
   
 
== Roundcube のインストール ==
 
== Roundcube のインストール ==
205行目: 240行目:
   
 
=== カレンダーのサポート ===
 
=== カレンダーのサポート ===
{{AUR|roundcubemail-plugins-kolab}} パッケージをインストールしてください。
 
   
  +
{{AUR|roundcubemail-plugins-kolab}} パッケージをインストールします。
Roundcube のデータベースを更新してください:
 
  +
  +
==== Roundcube データベースを更新する ====
  +
 
# mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/plugins/calendar/drivers/database/SQL/mysql.initial.sql
 
# mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/plugins/calendar/drivers/database/SQL/mysql.initial.sql
   
カレンダーのデフォルト設定をコピーしてください:
+
==== カレンダーサービスを設定する ====
  +
  +
ほとんどのアプリケーションではデフォルト設定で十分ですが、それを所定の位置に移動する必要があります。
 
# cp /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php.dist /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php
 
# cp /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php.dist /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php
   
 
==== Sabre\VObject\Property\Text Not Found ====
 
==== Sabre\VObject\Property\Text Not Found ====
  +
 
エラーが表示される場合、プラグインに Sabre が含まれていないか、バージョンが古くなっています。更新してください:
 
エラーが表示される場合、プラグインに Sabre が含まれていないか、バージョンが古くなっています。更新してください:
# cd /usr/share/webapps/roundcubemail
+
# cd /usr/share/webapps/roundcubemail ; composer update ; composer require sabre/dav ~3.1.3
# composer update
 
# composer require sabre/dav ~3.1.3
 
   
 
==== プラグインの有効化 ====
 
==== プラグインの有効化 ====
  +
 
{{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki>
 
{{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki>
 
$config['plugins'] = array(
 
$config['plugins'] = array(
232行目: 271行目:
 
);</nowiki>}}
 
);</nowiki>}}
 
詳しくは [https://github.com/blind-coder/rcmcarddav こちら] を参照してください。
 
詳しくは [https://github.com/blind-coder/rcmcarddav こちら] を参照してください。
  +
  +
=== SpamAssassin のトレーニングに Mark as Junk プラグインを使用する ===
  +
  +
{{ic|markasjunk}} プラグインは、メッセージメニューに "mark as spam" または "mark as not spam" ボタンを追加します。次のセットアップでは、そのような機能を使用して、{{ic|sa-learn}} で [[SpamAssassin]] フィルターを簡単にトレーニングします
  +
  +
同じディレクトリに {{ic|/usr/share/webapps/roundcubemail/plugins/markasjunk/config.inc.php.dist}} のコピーを {{ic|config.inc.php}} として作成し、次のように変更します。次に、次のものが揃っていることを確認してください:
  +
  +
{{hc|1=/usr/share/webapps/roundcubemail/plugins/markasjunk/config.inc.php|2=
  +
$config['markasjunk_learning_driver'] = 'cmd_learn';
  +
$config['markasjunk_spam_cmd'] = '/usr/bin/vendor_perl/sa-learn --spam --username=%u %f';
  +
$config['markasjunk_ham_cmd'] = '/usr/bin/vendor_perl/sa-learn --ham --username=%u %f';
  +
}}
  +
  +
プラグインを有効にします:
  +
{{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki>
  +
$config['plugins'] = [
  +
'markasjunk'
  +
];
  +
</nowiki>}}
   
 
== トラブルシューティング ==
 
== トラブルシューティング ==
  +
 
=== SMTP Error: Authentication failure ===
 
=== SMTP Error: Authentication failure ===
  +
 
{{ic|config.inc.php}} の以下の設定を無効化 (コメントアウト) してみてください:
 
{{ic|config.inc.php}} の以下の設定を無効化 (コメントアウト) してみてください:
 
//$config['smtp_user'] = '%u';
 
//$config['smtp_user'] = '%u';
 
//$config['smtp_pass'] = '%p';
 
//$config['smtp_pass'] = '%p';
  +
  +
=== Recipient address rejected ===
  +
  +
TLS または STARTTLS を使用しているかどうかに応じて、次のいずれかのエラーが発生する可能性があります:
  +
  +
530 5.7.0 Must issue a STARTTLS command first
  +
554 5.7.1 <>: Recipient address rejected: Access denied
  +
  +
その場合は、次の行を ''config.inc.php'' に追加してみてください。
  +
  +
$config['smtp_user'] = '%u';
  +
$config['smtp_pass'] = '%p';
   
 
== 参照 ==
 
== 参照 ==

2024年3月29日 (金) 13:50時点における版

Roundcube は機能豊富な PHP によるウェブベースのメールクライアントです。

インストール

roundcubemail パッケージをインストールしてください。さらにデータベース (MariaDB など) と PHP が動作するウェブサーバーが必要です。

設定

MariaDB

以下は MariaDB を使って Roundcube のデータベースをセットアップする例です。データベースの名前は roundcubemail で、ユーザーは roundcube でパスワードは password とします:

$ mysql -u root -p
CREATE DATABASE roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost' IDENTIFIED BY 'password';

使用するデータベースに関係なく、最初に roundcubemail のデータベーステーブルを初期化する必要があります。MariaDB の場合:

$ mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/SQL/mysql.initial.sql

SQLite

SQLite DB は Roundcube によって自動的に作成されます。設定に指定されたファイルが basedir に配置されていることを確認してください。basedir定義に /var/lib/roundcubemail を追加することを検討してください。これは、ディレクトリを作成し、httpchown することを意味します。

他のデータベース

Roundcubemail には MS SQL, Oracle, PostgreSQL のインストールスクリプトが存在します。

Roundcube

サンプル設定ファイルをコピーして必要に応じて修正してください:

# cd /etc/webapps/roundcubemail/config
# cp config.inc.php.sample config.inc.php
# chown http:http config.inc.php

メールサーバーの設定を行って、enable_installer を設定してセットアップウィザードを有効化してください:

/etc/webapps/roundcubemail/config/config.inc.php
$config['db_dsnw'] = 'mysql://roundcube:****@localhost/roundcubemail';
$config['default_host'] = 'tls://localhost'; // IMAP host
$config['smtp_server'] = 'tls://localhost';
$config['smtp_port'] = 587;
$config['des_key'] = 'some_awesome_long_semi_random_string';
$config['enable_installer'] = true;

Roundcube がファイル名拡張子から MIME タイプを検出できるようにするには、roundcube が mime.types ファイルを指すようにする必要があります。通常、Apache にはこれが付属しています。

# cp /etc/httpd/conf/mime.types /etc/webapps/roundcubemail/config/mime.types
# chown http:http /etc/webapps/roundcubemail/config/mime.types
/etc/webapps/roundcubemail/config/config.inc.php
$config['mime_types'] = RCUBE_INSTALL_PATH . 'config/mime.types';

Apache を使用していない場合は、/etc/webapps/roundcubemail/config/defaults.inc.php で入手可能な情報を確認してください。

PHP

PHP の設定で以下の変数を設定してください:

/etc/php/php.ini
date.timezone = "UTC"

そして以下の行をアンコメントしてください:

extension=iconv.so

php.iniopen_basedir を設定している場合、PHP から Roundcube のファイルが開けるように /etc/webapps/usr/share/webapps が含まれていることを確認してください。open_basedir を無効化・コメントアウトしている場合 (デフォルト設定)、何もする必要はありません。

ウェブサーバー (Apache)

Apache の設定を設定ディレクトリにコピーしてください:

# cp /etc/webapps/roundcubemail/apache.conf /etc/httpd/conf/extra/roundcube.conf

そして以下の行を追加してください:

/etc/httpd/conf/httpd.conf
Include conf/extra/roundcube.conf

その後 Apache (httpd.service) を再起動してください。

ノート: php-fpm を使用している場合は、php_admin_value open_basedir 行を削除します。削除しないと、ページにアクセスできなくなります。

ウェブサーバー (Nginx)

警告: これは、Web ルートのサブディレクトリで実行されている RoundCube の設定例であり、複数のソースからの情報を用いた実験に基づいてコンパイルされています。注意して進めてください。
ノート: これは、php-fpm を使用して nginx サーバーがすでにセットアップされていることを前提としています。

Roundcube の location ブロックを追加してください:

/etc/nginx/nginx.conf
location /webmail {
        alias /usr/share/webapps/roundcubemail;
        access_log /var/log/nginx/roundcube_access.log;
        error_log /var/log/nginx/roundcube_error.log;
        # Favicon
        location ~ ^/webmail/favicon.ico$ {
                root /usr/share/webapps/roundcubemail/skins/classic/images;
                log_not_found off;
                access_log off;
                expires max;
        }
        # Robots file
        location ~ ^/webmail/robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }
        # Deny Protected directories 
        location ~ ^/webmail/(config|temp|logs)/ {
                 deny all;
        }
        location ~ ^/webmail/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
                deny all;
        }
        location ~ ^/webmail/(bin|SQL)/ {
                deny all;
        }
        # Hide .md files
        location ~ ^/webmail/(.+\.md)$ {
                deny all;
        }
        # Hide all dot files
        location ~ ^/webmail/\. {
                deny all;
                access_log off;
                log_not_found off;
        }
        # Roundcube fastcgi config
        location ~ /webmail(/.*\.php)$ {
                include fastcgi.conf;
                fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                fastcgi_split_path_info ^/webmail/(.+\.php)(/.*)$;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail";
        }
}

Roundcube のより新しいバージョンでは、fastcgi_split_path_infofastcgi_param PATH_INFO を手動で設定すると、Roundcube が誤動作する原因となりました。$request_filename も機能しませんでした。 解決策としては以下のような設定が必要です。

      location ~ /webmail/?$ {
       include fastcgi.conf;
       fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail/index.php;
       fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/var/lib/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail:/var/lib/roundcubemail";
      }

別の設定を使用するには、インストーラーにアクセスするために location block が必要になります:

警告: この installer ロケーションブロックは 1 回だけ使用する必要があるため、インストール後に削除する必要があります。また、インストール手順でのみ使用されるため、インストール後に /usr/share/webapps/roundcubemail/installer/ ディレクトリを削除した方が安全です。Roundcube のインストール で説明されているように、$config['enable_installer'] = true;config.inc.php から削除するだけで十分な場合があります。
      location ~ /webmail/installer/?.*$ {
       include fastcgi.conf;
       fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail/installer/index.php;
       fastcgi_param PHP_VALUE open_basedir="/tmp/:/var/cache/roundcubemail:/var/lib/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail:/var/lib/roundcubemail";
      }

その後 nginx.service再起動 してください。

ノート: パスワードプラグインを使用する場合は、/dev/nullopen_basedir リストに追加してください。

Roundcube のインストール

ブラウザで http://localhost/roundcube/installer を開いて Roundcube のインストールウィザードを行ってください。

セキュリティ上、ウィザードを完了したら config.inc.php から $config['enable_installer'] = true; を削除してインストーラーを無効化してください。

~/roundcube/config ディレクトリにはサーバーに関する重要な情報が含まれるため、以下の設定を追加してディレクトリにアクセスできないようにすることを推奨します:

/etc/httpd/conf/extra/roundcube.conf
  <Directory /usr/share/webapps/roundcubemail/config>
     Options -FollowSymLinks
     AllowOverride None
     Require all denied
  </Directory>

ヒントとテクニック

TLS 認証しかできない IMAP/SMTP サーバーを使用する

最近の IMAP/SMTP サーバーでは暗号化された認証 (STARTTLS) しかできないのが普通です。TLS 認証を使用する場合、ウェブベースのインストーラーは役に立ちません。/etc/webapps/roundcubemail/config/config.inc.php を手動で編集して、以下の行を追加してください:

 $config['default_host'] = 'tls://mail.my_domain.org';
 // For STARTTLS IMAP
 $config['imap_conn_options'] = array(
     'ssl' => array(
       'verify_peer'       => true,
       // certificate is not self-signed if cafile provided
       'allow_self_signed' => false,
       'cafile'  => '/etc/ssl/certs/Your_CA_certificate.pem',
       // probably optional parameters
       'ciphers' => 'TLSv1+HIGH:!aNull:@STRENGTH',
       'peer_name'         => 'mail.my_domain.org',
     ),
 );
 // For STARTTLS SMTP
 $config['smtp_conn_options'] = array(
     'ssl' => array(
       'verify_peer'       => true,
       // certificate is not self-signed if cafile provided
       'allow_self_signed' => false,
       'cafile'  => '/etc/ssl/certs/Your_CA_certificate.pem',
       // probably optional parameters
       'ciphers' => 'TLSv1+HIGH:!aNull:@STRENGTH',
       'peer_name'         => 'mail.my_domain.org',
     ),
 );

mail.my_domain.org は SSL 証明書の CN ホストネーム (IMAP サーバーのホストネーム) に、/etc/ssl/certs/Your_CA_certificate.pem は SSL 証明書のパスに置き換えてください。ciphers は IMAP サーバーによって許可されている暗号にあわせて編集してください。

PHP の SSL 設定オプションについては こちら を参照。

PDF と OpenDocument ファイルのプレビュー

Roundcube の拡張で添付された PDF や OpenDocument ファイルをプレビューすることができます。

roundcubemail-plugins-kolabAUR パッケージをインストールして設定ファイルに以下の行を追加して拡張を有効にしてください:

/etc/webapps/roundcubemail/config/config.inc.php
$config['plugins'] = array(
    'pdfviewer',
    'odfviewer'
);

ファイルのパーミッションに問題が起こる場合、以下のコマンドを試してみてください:

# chown -R http:http /usr/share/webapps/roundcubemail/plugins/odfviewer/files

カレンダーのサポート

roundcubemail-plugins-kolabAUR パッケージをインストールします。

Roundcube データベースを更新する

# mysql -u root -p roundcubemail < /usr/share/webapps/roundcubemail/plugins/calendar/drivers/database/SQL/mysql.initial.sql

カレンダーサービスを設定する

ほとんどのアプリケーションではデフォルト設定で十分ですが、それを所定の位置に移動する必要があります。

# cp /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php.dist /usr/share/webapps/roundcubemail/plugins/calendar/config.inc.php

Sabre\VObject\Property\Text Not Found

エラーが表示される場合、プラグインに Sabre が含まれていないか、バージョンが古くなっています。更新してください:

# cd /usr/share/webapps/roundcubemail ; composer update ; composer require sabre/dav ~3.1.3

プラグインの有効化

/etc/webapps/roundcubemail/config/config.inc.php
$config['plugins'] = array(
    'calendar'
);

CardDav でアドレス帳を同期

アドレス帳を使ってアドレスなどを自動補完できると便利です。連絡先をどこかに保存していて、リモートアプリケーションによって CardDav で同期できる場合、roundcube-rcmcarddavAUR[リンク切れ: パッケージが存在しません] 拡張を使うことで Roundcube でリモートのアドレス帳にアクセスできます。有効にするには、以下の行を設定ファイルに追加してください:

/etc/webapps/roundcubemail/config/config.inc.php
$config['plugins'] = array(
    'carddav'
);

詳しくは こちら を参照してください。

SpamAssassin のトレーニングに Mark as Junk プラグインを使用する

markasjunk プラグインは、メッセージメニューに "mark as spam" または "mark as not spam" ボタンを追加します。次のセットアップでは、そのような機能を使用して、sa-learnSpamAssassin フィルターを簡単にトレーニングします

同じディレクトリに /usr/share/webapps/roundcubemail/plugins/markasjunk/config.inc.php.dist のコピーを config.inc.php として作成し、次のように変更します。次に、次のものが揃っていることを確認してください:

/usr/share/webapps/roundcubemail/plugins/markasjunk/config.inc.php
$config['markasjunk_learning_driver'] = 'cmd_learn';
$config['markasjunk_spam_cmd'] = '/usr/bin/vendor_perl/sa-learn --spam --username=%u %f';
$config['markasjunk_ham_cmd'] = '/usr/bin/vendor_perl/sa-learn --ham --username=%u %f';

プラグインを有効にします:

/etc/webapps/roundcubemail/config/config.inc.php
$config['plugins'] = [
    'markasjunk'
];

トラブルシューティング

SMTP Error: Authentication failure

config.inc.php の以下の設定を無効化 (コメントアウト) してみてください:

//$config['smtp_user'] = '%u';
//$config['smtp_pass'] = '%p';

Recipient address rejected

TLS または STARTTLS を使用しているかどうかに応じて、次のいずれかのエラーが発生する可能性があります:

 530 5.7.0 Must issue a STARTTLS command first
 554 5.7.1 <>: Recipient address rejected: Access denied

その場合は、次の行を config.inc.php に追加してみてください。

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';

参照