跳至主要内容
五折优惠 全部方案,限时优惠。起价 $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

停止 stack:

cd /root/roundcube && docker compose down

启动 stack:

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. 打开浏览器,访问: 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/月。