我已将系统设置为通过 Gmail 发送电子邮件。
系统在我可以发送电子邮件的范围内工作,但是我收到有关安全证书的错误。
这是 mail.log 中的一个示例条目:
Oct 29 12:17:27 durban postfix/smtp[20742]: setting up TLS connection
to smtp.gmail.com[209.85.143.108]:587
Oct 29 12:17:27 durban postfix/smtp[20742]: certificate verification
failed for smtp.gmail.com[209.85.143.108]:587: untrusted issuer
/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Oct 29 12:17:27 durban postfix/smtp[20742]: Untrusted TLS connection
established to smtp.gmail.com[209.85.143.108]:587: TLSv1 with cipher
RC4-SHA (128/128 bits)
Oct 29 12:17:29 durban postfix/smtp[20742]: BA4852A1BFA:
to=<some@email.com>, relay=smtp.gmail.com[209.85.143.108]:587,
delay=2.9, delays=0.1/0.1/1.3/1.4, dsn=2.0.0, status=sent (250 2.0.0
OK 1319887049 l20sm20686943wbo.6)
Run Code Online (Sandbox Code Playgroud)
我在 google 上搜索了这个问题,并找到了其他有问题的人,他们可以通过更新 /etc/postfix 目录中名为 cacert.pem 的文件来解决它。
在我的 main.cf 我有以下行(除其他外):
smtpd_tls_CAfile=/etc/postfix/cacert.pem
Run Code Online (Sandbox Code Playgroud)
我有这个文件: …