我正在 Arch Linux 上设置 postfix 服务器。到目前为止它似乎工作正常 - 我可以通过telnet localhost 25. 但是,当我尝试使用 openssl 进行连接时s_client,它会抱怨:
$ openssl s_client -connect localhost:25
CONNECTED(00000003)
140243743024808:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:766:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 228 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
Run Code Online (Sandbox Code Playgroud)
并以状态 1 退出。
相关部分/etc/postfix/main.cf:
smtpd_tls_key_file = /path/to/server.key.pem
smtpd_tls_cert_file = /path/to/server.crt.pem
smtpd_tls_CAfile = /path/to/ca.pem
smtpd_tls_security_level = may
Run Code Online (Sandbox Code Playgroud)
我还有非 pem 格式的密钥和证书,并且它们与使用它们的另一个服务(xmpp 服务器)一起工作正常。
我发现文档说要实现这一点,我需要取消注释一行/etc/postfix/main.cf并使用端口 587 而不是 25。这给了我与openssl s_client上面相同的输出。
如何说服 postfix 使用 TLS?
| 归档时间: |
|
| 查看次数: |
4748 次 |
| 最近记录: |