メインコンテンツへスキップ
50% off 全プラン対象、期間限定。月額 $2.48/mo
Roundcube

Roundcube

Roundcube はブラウザで動作する IMAP クライアントで、どのメールサーバーにも本格的なウェブメール画面を与えます。ドラッグ&ドロップのフォルダ、スレッド表示、アドレス帳、そして残りはプラグイン API で拡張できます。GPL-3.0 ライセンス、GitHub スター 7,100 以上。

概要

ライセンス GPL-3.0 バージョン 1.7.3 OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4,IPV6

Roundcube へアクセス

  • ブラウザで次の URL を開きます: https://<SERVER_IP>
  • インストールでは自己署名 TLS 証明書を使用するため、ブラウザにセキュリティ警告が表示されます。証明書を承認して続行してください。
  • ポート 80 への HTTP リクエストは自動的に HTTPS へリダイレクトされます。

ログイン

  • Roundcube はメールボックスのアカウントを作成も保存もしません。
  • 設定済みの IMAP サーバー上にある既存メールボックスのユーザー名とパスワードでログインします。

メールサーバーの設定

メールサーバーの接続設定は次の場所に保存されます: /root/roundcube/.env

重要な設定:

  • IMAP ホスト: IMAP_HOST
  • IMAP ポート: IMAP_PORT
  • SMTP ホスト: SMTP_HOST
  • SMTP ポート: SMTP_PORT
  • ユーザー名のドメイン: USERNAME_DOMAIN

既定の設定にはプレースホルダーの値が入っています:

IMAP_HOST=ssl://mail.example.org
IMAP_PORT=993

SMTP_HOST=tls://mail.example.org
SMTP_PORT=587

実際のメールサーバーのホスト名に置き換えてください。

設定を変更したら、次のコマンドで反映します:

cd /root/roundcube && docker compose up -d

TLS 接続の種類

お使いのメールサーバーに合ったプレフィックスを指定します:

  • ssl://: Implicit TLS, typically used with IMAP port 993 or SMTP port 465.
  • tls://: STARTTLS, typically used with IMAP port 143 or SMTP port 587.

自己署名のメールサーバー証明書

IMAP または SMTP サーバーが自己署名証明書を使っている場合、Roundcube が接続を拒否することがあります。

任意の TLS 検証設定は次の場所にあります: /root/roundcube/config/custom.inc.php

該当する IMAP または SMTP の接続オプションは、メールサーバーとネットワークを信頼できる場合にのみコメントを解除して設定してください。

設定を適用:

cd /root/roundcube && docker compose restart roundcube

プラグインとスキン

既定のインストールで有効になるもの:

  • archive
  • zipdownload

Plugins are configured through the PLUGINS variable in: /root/roundcube/.env

例えば:

PLUGINS=archive,zipdownload,managesieve

変更を適用します:

cd /root/roundcube && docker compose up -d

Bundled plugins such as managesieve, markasjunk、そして enigma can be enabled by adding them to PLUGINS, when supported by the image.

For third-party plugins, add them to ROUNDCUBEMAIL_COMPOSER_PLUGINS in the Compose file and include their names in PLUGINS.

Roundcube の管理

コンテナの状態を確認します:

cd /root/roundcube && docker compose ps

ログを表示:

cd /root/roundcube && docker compose logs -f

Roundcube を再起動します:

cd /root/roundcube && docker compose restart roundcube

スタックを停止:

cd /root/roundcube && docker compose down

スタックを起動:

cd /root/roundcube && docker compose up -d

重要なファイルとディレクトリ

  • インストールパス: /root/roundcube
  • Compose ファイル: /root/roundcube/docker-compose.yml
  • 環境ファイル: /root/roundcube/.env
  • 追加の設定: /root/roundcube/config/custom.inc.php
  • データベースボリューム: /var/lib/docker/volumes/roundcube_db_data
  • Nginx 設定: /etc/nginx/sites-available/roundcube
  • TLS 証明書: /etc/nginx/ssl/roundcube.crt
  • TLS 秘密鍵: /etc/nginx/ssl/roundcube.key

ドメインと HTTPS

1. Point your domain to the server's IP address (e.g., yourdomain.com;).

2. Certbot をインストール:

apt update
apt install -y certbot python3-certbot-nginx

3. Edit NGINX config and replace both server_name _; entries with your domain (e.g., server_name yourdomain.com;):

vim /etc/nginx/sites-available/roundcube

4. TLS 証明書を発行します:

certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com

5. 次を編集します /etc/nginx/sites-available/roundcube そして次を更新します ssl_certificatessl_certificate_key ディレクティブを、自分の Let's Encrypt 証明書を使用するように更新します。

Before:
    ssl_certificate     /etc/nginx/ssl/roundcube.crt;
    ssl_certificate_key /etc/nginx/ssl/roundcube.key;
After:
    ssl_certificate  /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

6. 設定をテストします:

nginx -t

7. NGINX を再読み込みします:

systemctl reload nginx

8. ブラウザを開き、以下の URL にアクセスする: https://yourdomain.com

注意事項

  • Roundcube is publicly accessible through Nginx on ports 80443.
  • The Roundcube container itself listens only on 127.0.0.1:8000.
  • MariaDB は Docker 内部のサービスであり、ホストへ直接公開されていません。
  • 既定のウェブ画面は自己署名 TLS 証明書を使用します。
  • The upload limit is set to 25 MB; increase both UPLOAD_MAX_FILESIZE and Nginx's client_max_body_size for larger uploads.
  • Roundcube の設定は必要に応じて変更してください。

セルフホストの他の記事

関連アプリ。

Deploy Roundcube now. 月額2.48ドルから。