我的邮件服务器有一个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应用程序的代理运行。因为我有
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 si通过imap连接到dovecot。
现在,我想使用端口993和ssl/tls。
我尝试取消了RoundCubeEmail_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
我现在有一个响应:到存储服务器的连接错误。
在我的roundcube日志中:
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"
在多佛科特原木中
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>
多佛科特联系得很好,但是?不知道是什么问题。