我对 Debian 比较熟悉,并一直试图用它设置邮件服务器教程。
现在我已经浏览了网站上提供的所有评论,试图解决问题,但它们似乎不起作用。我在 serverfault 上遇到过一些类似的问题,但它们也不起作用。我最大的挑战是真正弄清堆栈跟踪的来龙去脉。
我看到很多警告和一些错误,但无法判断路由原因。最大的挑战是这是我第一次处理与邮件/smtp 相关的任何事情。
我解决的第一个错误是这个
Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given
通过添加到文件。 注意 根据大量帖子,添加此行的文件会有所不同。"postmaster_address = [email protected]"
/etc/dovecot/conf.d/15-lda.conf
现在出现了我无法理解的长堆栈跟踪
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: warning: TLS library problem: 28713:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: warning: TLS library problem: 28713:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: warning: TLS library problem: 28713:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: warning: TLS library problem: 28714:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: warning: TLS library problem: 28714:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: warning: TLS library problem: 28714:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: warning: hostname xxx.xxx.xx.x.hostname.com does not resolve to address xxx.xxx.xx.x: No address associated with hostname
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: connect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: warning: hostname xxx.xxx.xx.x.hostname.com does not resolve to address xxx.xxx.xx.x: No address associated with hostname
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: connect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: warning: TLS library problem: 28718:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: warning: TLS library problem: 28718:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: warning: TLS library problem: 28718:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: warning: TLS library problem: 28719:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: warning: TLS library problem: 28719:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: warning: TLS library problem: 28719:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: warning: hostname xxx.xxx.xx.x.hostname.com does not resolve to address xxx.xxx.xx.x: No address associated with hostname
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: connect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: warning: hostname xxx.xxx.xx.x.hostname.com does not resolve to address xxx.xxx.xx.x: No address associated with hostname
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: connect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: improper command pipelining after EHLO from unknown[xxx.xxx.xx.x]: QUIT\r\n
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28713]: disconnect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: improper command pipelining after EHLO from unknown[xxx.xxx.xx.x]: QUIT\r\n
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28714]: disconnect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: improper command pipelining after EHLO from unknown[xxx.xxx.xx.x]: QUIT\r\n
Jan 9 00:27:19 xxxxxxxx postfix/smtpd[28718]: disconnect from unknown[xxx.xxx.xx.x]
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: improper command pipelining after EHLO from unknown[xxx.xxx.xx.x]: QUIT\r\n
Jan 9 00:27:19 xxxxxxxx postfix/submission/smtpd[28719]: disconnect from unknown[xxx.xxx.xx.x]
答案1
看起来好像存在一个问题,请/etc/ssl/certs/dovecot.pem
检查文件是否存在以及 Dovecot 是否有权读取它,或者禁用 SSL 功能。
在我的 Ubuntu 机器上,dovecot.pem 位于 /etc/dovecot,用户为 root,组为 dovecot。
答案2
Dovecot 软件包通常会提供一个包装脚本/usr/share/doc/dovecot-<version>/mkcert.sh
。尝试使用它来生成自签名证书。