配置完postfix+dovecot+roundcube,登录roundcube连接至 IMAP 服务器失败

最后发现原因:
dovecot配置文件写错了。

roundcube 配置完后登陆不上:

sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/access.log

在这里插入图片描述

cat /var/log/mail.err
Jan 26 17:45:48 localhost postfix[30444]: error: to submit mail, use the Postfix sendmail command
Jan 26 17:45:48 localhost postfix[30444]: fatal: the postfix command is reserved for the superuser
Jan 26 22:44:10 localhost postfix[16921]: error: to submit mail, use the Postfix sendmail command
Jan 26 22:44:10 localhost postfix[16921]: fatal: the postfix command is reserved for the superuser
Jan 27 15:39:36 localhost postfix/smtpd[2808]: fatal: no SASL authentication mechanisms

看起来与mial.err无关,

 cat /var/log/roundcube/errors
 
[27-Jan-2021 16:25:19 +0800]: <f6i37nk9> IMAP Error: Login failed for x.xyz from 14.20.10.2. Could not connect to xxxxx.xyz:143: Connection refused in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)

telnet localhost 143
#查了下,993,995,100,143 都无法连接,直接refused了

傻,坑爹
cat /var/log/syslog

Jan 27 17:16:32 localhost systemd[1]: Started Dovecot IMAP/POP3 email server.
Jan 27 17:16:32 localhost dovecot[19828]: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 17: ssl_cert: Can't open file /etc/dovecot/conf.d/etc/letsencrypt/live/xxxxr.xyz/fullchain.pem: No such file or directory
Jan 27 17:16:32 localhost systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
Jan 27 17:16:32 localhost systemd[1]: dovecot.service: Failed with result 'exit-code'.

配置文件里面写错东西了,路径写错了,少了前面的 /

ssl_cert = </etc/letsencrypt/live/example.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/example.com/privkey.pem

写成了:

ssl_cert = <etc/letsencrypt/live/example.com/fullchain.pem
ssl_key = <etc/letsencrypt/live/example.com/privkey.pem

喵的,马大哈啊!
修改好,启动dovecot,以后不能一个命令启动就完事,要确认一下是否启动成功。白白浪费半个下午。。。醉

sudo service dovecot restart
sudo service dovecot status
 netstat -nltp | egrep '25|110|143|465|993|995'

在这里插入图片描述

在这里插入图片描述
搞定,可以收发邮件啦,
快乐玩耍。。。。
已验证,配置的邮箱与qq,gmail邮箱之间可正常收发。理论上,都正常了。速度也挺快
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Guess you like

Origin blog.csdn.net/hunter___/article/details/113251779