我的邮件服务器有一个Docker堆栈。
我的docker-compose.xml
包含
version: '3.7'
services:
postfix:
...
dovecot:
....
ports:
- "110:110"
- "995:995"
- "143:143"
- "993:993"
networks:
- mail
....
roundcube:
image: roundcube/roundcubemail
container_name: roundcube
environment:
- ROUNDCUBEMAIL_DEFAULT_HOST=dovecot
# - ROUNDCUBEMAIL_DEFAULT_PORT=993
networks:
- proxy
- mail
我还有一个Nginx容器作为我所有web应用程序的代理运行。对于roundcube我有
set $roundcube_upstream http://roundcube;
location /roundcube/ {
rewrite ^/roundcube/(.*) /$1 break;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_pass $roundcube_upstream;
}
有了这个配置,它就可以工作了。我可以去https://www.mydomain.be/rouncube/,我可以登录。默认端口为143。所以roundcube正在用imap连接到dovecot。
现在,我想使用端口993和ssl/tls。
我尝试过分解ROUNDCUBEMAIL_DEFAULT_PORT=993,但也使用ssl://dovecot或tls://dovecot或ssl://mail.mydomain.be,...但是什么都不起作用。
当我点击connextion按钮时,过了一段时间,我收到了一个nginx错误页面。在我的代理日志中我可以看到
2019/01/31 09:29:25 [error] 460#460: *82483 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 194.197.210.75, server: www.mydomain.be, request: "POST /roundcube/?_task=login HTTP/1.1", upstream: "http://172.18.0.9:80/?_task=login", host: "www.mydomain.be", referrer: "https://www.mydomain.be/roundcube/"
我不明白http://172.18.0.9:80/?_task=login是从哪里来的?
使用Thunderbird客户端,我可以在该端口上进行连接。
有什么问题吗?
编辑
使用
- ROUNDCUBEMAIL_DEFAULT_HOST=ssl://dovecot
- ROUNDCUBEMAIL_DEFAULT_PORT=993
我现在得到了一个响应:连接到存储服务器时出错。
在我的圆立方体日志中:
errors: <1db522a3> IMAP Error: Login failed for me@mydomain.be from 172.18.0.8(X-Real-IP: ...,X-Forwarded-For: ...). Could not connect to ssl://dovecot:993: Unknown reason in /var/www/html/program/lib/Roundcube/rcube_imap.php on line 196 (POST /?_task=login&_action=login)172.18.0.8 - - [31/Jan/2019:13:57:37 +0100] "POST /?_task=login HTTP/1.1" 200 3089 "https://www.mydomain.be/roundcube/?_task=login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
在dovecot日志中
2019-01-31T13:57:38.002653+01:00 536ff3507263 dovecot: auth: Debug: auth client connected (pid=35),
2019-01-31T13:57:38.010096+01:00 536ff3507263 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=192.168.240.3, lip=192.168.240.2, TLS, session=<nVssksCAT7LAqPAD>
所以多维科特联系得很好但是...?不知道有什么问题。
发布于 2019-06-10 11:56:58
您的问题是,默认情况下,roundcube需要验证TLS或SSL证书。从邮件服务器复制证书,使用letsencrypt验证您的证书,或者在您的圆方配置中关闭对等验证。
https://stackoverflow.com/questions/54459552
复制相似问题