Postfix 无法加载证书颁发机构数据错误

And*_*eaF 4 ssl debian postfix arm

我正在尝试使用 postfix 作为 gmail 中继

smtp参数是

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls=yes
smtp_tls_CAfile = /etc/ssl/ca-certificates.crt
smtp_tls_key_file=/etc/letsencrypt/live/MYDOMAIN.com/privkey.pem
smtp_tls_cert_file=/etc/letsencrypt/live/MYDOMAIN.com/cert.pem
smtp_tls_security_level=encrypt</id_string></id_string> 
Run Code Online (Sandbox Code Playgroud)

该消息显示为已正确发送,但实际上没有发送任何邮件,并且在邮件日志中,该问题似乎是由 TSL 错误引起的

 cannot load Certification Authority data, CAfile="/etc/ssl/ca-certificates.crt": disabling TLS support
 warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('/etc/ssl/ca-certificates.crt','r'):
 warning: TLS library problem: error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:
 warning: TLS library problem: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:../crypto/x509/by_file.c:199:
 connect to smtp.gmail.com:25: Network is unreachable
Run Code Online (Sandbox Code Playgroud)

该文件ca-certificates.crt存在于路径中/etc/ssl/并且已经存在于 Debian 发行版中

另一个奇怪的事情是,如果main.cf我尝试改变线路

smtp_tls_CAfile = /etc/ssl/ca-certificates.crt
Run Code Online (Sandbox Code Playgroud)

使用其他一些证书,错误

cannot load Certification Authority data, CAfile="/etc/ssl/ca-certificates.crt": disabling TLS support
Run Code Online (Sandbox Code Playgroud)

尽管已使用,但仍保持不变,而不是指向配置的证书名称,postfix reloadsystemctl restart postfix.service确保更新配置

我应该如何修复这个错误?

Ger*_*der 5

在我的 Debian 机器(9、10 和 11)上,路径是ca-certificates.crt

/etc/ssl/certs/ca-certificates.crt
Run Code Online (Sandbox Code Playgroud)

这个应该是默认的,我没有改。

在我的 postfix 安装中,我什至没有设置smtp_tls_CAfile参数。如果您通过 Debian 软件包管理安装了 postfix 和 ca-certificates 软件包,它应该默认为正确的文件。