Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Roundcubeのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Roundcube
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:メールクライアント]] [[Category:ウェブアプリケーション]] [[en:Roundcube]] [http://roundcube.net Roundcube] は機能豊富な [[PHP]] によるウェブベースのメールクライアントです。 == インストール == {{pkg|roundcubemail}} パッケージを[[インストール]]してください。さらにデータベース ([[MariaDB]] など) と [[PHP]] が動作する[[:カテゴリ:ウェブサーバー|ウェブサーバー]] ([[Apache HTTP Server]] など) が必要です。 == 設定 == === MariaDB === 以下は [[MariaDB]] を使って Roundcube のデータベースをセットアップする例です。データベースの名前は {{ic|roundcubemail}} で、ユーザーは {{ic|roundcube}} でパスワードは {{ic|password}} とします: {{hc|$ 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 のデータベースは Roundcube によって自動的に作成されます。設定ファイルに指定したディレクトリが {{ic|basedir}} に含まれていることを確認してください。{{ic|/var/lib/roundcubemail}} を定義に追加して、ディレクトリを作成、所有者を {{ic|http}} にすると良いでしょう。 === 他のデータベース === Roundcubemail には MS SQL, Oracle, [[PostgreSQL]] のインストールスクリプトが存在します。 === Roundcube === サンプル設定ファイルをコピーして必要に応じて修正してください: # cp /etc/webapps/roundcubemail/config/config.inc.php.sample /etc/webapps/roundcubemail/config/config.inc.php メールサーバーの設定を行って、{{ic|enable_installer}} を設定してセットアップウィザードを有効化してください: {{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki> $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; </nowiki>}} === PHP === PHP の設定で以下の変数を設定してください: {{hc|/etc/php/php.ini|<nowiki> date.timezone = "UTC" </nowiki>}} そして以下の行をアンコメントしてください: extension=iconv.so {{ic|php.ini}} で {{ic|open_basedir}} を設定している場合、PHP から Roundcube のファイルが開けるように {{ic|/etc/webapps}} と {{ic|/usr/share/webapps}} が含まれていることを確認してください。{{ic|open_basedir}} を無効化・コメントアウトしている場合 (デフォルト設定)、何もする必要はありません。 === ウェブサーバー (Apache) === Apache の設定を設定ディレクトリにコピーしてください: # cp /etc/webapps/roundcubemail/apache.conf /etc/httpd/conf/extra/roundcube.conf そして以下の行を追加してください: {{hc|/etc/httpd/conf/httpd.conf|<nowiki> Include conf/extra/roundcube.conf </nowiki>}} その後 Apache ({{ic|httpd.service}}) を再起動してください。 {{Note|[[Apache HTTP Server#php-fpm と mod_proxy_fcgi を使う|php-fpm]] を使用している場合は、{{ic|php_admin_value open_basedir}} 行を削除します。削除しないと、ページにアクセスできなくなります。}} === ウェブサーバー (Nginx) === {{Warning|これは、Web ルートのサブディレクトリで実行されている RoundCube の設定例であり、複数のソースからの情報を用いた実験に基づいてコンパイルされています。注意して進めてください。}} {{Note|これは、[[Nginx#FastCGI|php-fpm]] を使用して [[nginx]] サーバーがすでにセットアップされていることを前提としています。}} Roundcube の location ブロックを追加してください: {{hc|/etc/nginx/nginx.conf|<nowiki> 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"; } } </nowiki>}} Roundcube のより新しいバージョンでは、{{ic|fastcgi_split_path_info}} と {{ic|fastcgi_param PATH_INFO}} を手動で設定すると、Roundcube が誤動作する原因となりました。{{ic|$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 が必要になります: {{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 のインストール == ブラウザで http://localhost/roundcube/installer を開いて Roundcube のインストールウィザードを行ってください。 セキュリティ上、ウィザードを完了したら {{ic|config.inc.php}} から {{ic|1=$config['enable_installer'] = true;}} を削除してインストーラーを無効化してください。 {{ic|~/roundcube/config}} ディレクトリにはサーバーに関する重要な情報が含まれるため、以下の設定を追加してディレクトリにアクセスできないようにすることを推奨します: {{hc|/etc/httpd/conf/extra/roundcube.conf|<nowiki> <Directory /usr/share/webapps/roundcubemail/config> Options -FollowSymLinks AllowOverride None Require all denied </Directory> </nowiki>}} == ヒントとテクニック == === TLS 認証しかできない IMAP/SMTP サーバーを使用する === 最近の IMAP/SMTP サーバーでは暗号化された認証 (STARTTLS) しかできないのが普通です。TLS 認証を使用する場合、ウェブベースのインストーラーは役に立ちません。{{ic|/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', ), ); {{ic|mail.my_domain.org}} は SSL 証明書の {{ic|CN}} ホストネーム (IMAP サーバーのホストネーム) に、{{ic|/etc/ssl/certs/Your_CA_certificate.pem}} は SSL 証明書のパスに置き換えてください。{{ic|ciphers}} は IMAP サーバーによって許可されている暗号にあわせて編集してください。 PHP の SSL 設定オプションについては [http://php.net/manual/ja/context.ssl.php こちら] を参照。 === PDF と OpenDocument ファイルのプレビュー === Roundcube の拡張で添付された PDF や OpenDocument ファイルをプレビューすることができます。 {{AUR|roundcubemail-plugins-kolab}} パッケージをインストールして設定ファイルに以下の行を追加して拡張を有効にしてください: {{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki> $config['plugins'] = array( 'pdfviewer', 'odfviewer' ); </nowiki>}} ファイルのパーミッションに問題が起こる場合、以下のコマンドを試してみてください: {{bc|# chown -R http:http /usr/share/webapps/roundcubemail/plugins/odfviewer/files}} === カレンダーのサポート === {{AUR|roundcubemail-plugins-kolab}} パッケージをインストールします。 ==== 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 ==== プラグインの有効化 ==== {{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki> $config['plugins'] = array( 'calendar' );</nowiki>}} === CardDav でアドレス帳を同期 === アドレス帳を使ってアドレスなどを自動補完できると便利です。連絡先をどこかに保存していて、リモートアプリケーションによって CardDav で同期できる場合、{{AUR|roundcube-rcmcarddav}}{{Broken package link|パッケージが存在しません}} 拡張を使うことで Roundcube でリモートのアドレス帳にアクセスできます。有効にするには、以下の行を設定ファイルに追加してください: {{hc|/etc/webapps/roundcubemail/config/config.inc.php|<nowiki> $config['plugins'] = array( 'carddav' );</nowiki>}} 詳しくは [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 === {{ic|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'; == 参照 == * [https://github.com/roundcube/roundcubemail/wiki/Configuration The Roundcube Howto Config Wiki page] * [http://roundcube.net 公式ウェブページ] * [https://github.com/roundcube/roundcubemail/wiki/Installation 公式インストールマニュアル]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Broken package link
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
Roundcube
に戻る。
検索
検索
Roundcubeのソースを表示
話題を追加