[BUG]使用BillionMailcore:4.9.3,开启safePath后,Roundcube WebMail 访问存在not found异常。
Operating System
Linux
OS Version
Ubuntu 22.04
System Architecture
x86_64
Docker Version
Docker version 29.8.1, build 4a63305
Docker Compose Version
Docker Compose version v5.5.1
Reproducible in Latest Version?
Yes, occurs in the latest stable release
Reproduction Steps
使用 Docker 部署 BillionMail。
使用以下版本:
- BillionMail Core:
4.9.3 - Roundcube:
1.6.11 - Roundcube image:
roundcube/roundcubemail:1.6.11-fpm-alpine
- BillionMail Core:
在
.env中启用 SafePath:
SafePath=billion- Roundcube 配置使用:
ROUNDCUBEMAIL_REQUEST_PATH=/roundcube- 通过反向代理访问:
https://<your-domain>/roundcube- 使用已经能够正常访问 BillionMail/Roundcube 的设备访问一次
/roundcube。 - 再使用其他设备(例如手机、其他浏览器或无历史会话的客户端)访问相同的
/roundcube地址。 - 同时检查 BillionMail Core 的 access log。
Observed Behavior
部分设备可以正常访问 /roundcube,并能够加载 Roundcube 页面及静态资源。
例如正常访问请求:
200 "GET https <domain> /roundcube HTTP/1.1"以及:
200 "GET https <domain> /roundcube/skins/elastic/..."而其他设备访问相同的 /roundcube URL 时会直接返回:
404 Not FoundCore access log 中对应请求类似:
404 "GET https <domain> /roundcube HTTP/1.1"服务器本地直接请求 Core 的 /roundcube 也可以复现 404:
curl -I http://127.0.0.1:5678/roundcube返回:
HTTP/1.1 404 Not Found同一个客户端在不同时间访问时,也可能出现 /roundcube 返回 200 和 404 的情况。正常请求可以继续加载 Roundcube 静态资源,而 404 请求会在很短时间内直接结束。
Expected Behavior
启用 SafePath 后,Roundcube WebMail 应该仍然能够作为正常的用户入口被访问。
以下路径应该可以正常访问:
/roundcube
/roundcube/
/roundcube/*不同设备、不同浏览器以及没有之前会话的客户端访问 /roundcube 时,都应该得到正常的 Roundcube 页面,而不是因为 SafePath 状态不同而返回 404 Not Found。
SafePath 应继续保护 BillionMail 管理后台入口,但不应该阻止 Roundcube WebMail 的正常访问。
Supplemental Information
Roundcube 文件检查
Roundcube 文件在宿主机、Roundcube 容器以及 Core 容器中均存在,包含:
index.php
plugins/
program/
skins/
vendor/例如:
/opt/docker/BillionMail/webmail-data/index.php文件存在。
Roundcube 容器内:
/var/www/html/index.php同样存在。
Core 容器共享目录中也存在完整的 Roundcube 文件。
Roundcube 配置
ROUNDCUBEMAIL_REQUEST_PATH=/roundcube
ROUNDCUBEMAIL_VERSION=1.6.11Roundcube 使用 PHP-FPM:
roundcube/roundcubemail:1.6.11-fpm-alpineCore 服务
Core 正常启动并监听:
http server started listening on [:5678]
https server started listening on [:5679]SafePath
当前配置:
SafePath=billion目前观察到的现象与 SafePath 的访问控制高度相关:部分已有访问状态的客户端可以正常进入 /roundcube,而其他客户端会直接得到 404。
因此初步怀疑 SafePath 的前置访问控制逻辑错误地影响了 /roundcube 路径。
希望确认 SafePath 是否应该将:
/roundcube
/roundcube/*加入允许访问的路径,或者在 SafePath 的访问控制逻辑中排除 Roundcube WebMail。
Supplemental Information
Source: Billionmail/BillionMail