postfix与外部邮件服务器连接时使用tls - did not encrypt this message - smtp_tls_security_level
问题:debian上的postfix发信给gmail用户,显示 security domain did not encrypt this message。
尝试:按google提供的帮助,大意是说邮件传送过程不是使用安全的连接。实例是机子上的postfix在连接google的邮件服务器时,没有使用tls连接。
那在postfix的配置文件main.cf里加上 smtp_tls_security_level = may
,那就好了。mail.log里会有相应的日志,如:postfix/smtp[31853]: Untrusted TLS connection established to gmail-smtp-in.l.google.com[2404:6800:4008:c03::1a]:25: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256
参考:
- https://serverfault.com/questions/931476/how-to-send-encrypted-message-using-postfix
- https://www.infopackets.com/news/10218/how-fix-send-encrypted-email-gmail-postfix-tls-ssl-certificates
- http://www.postfix.org/TLS_README.html
- https://support.google.com/mail/answer/6330403?authuser=1&visit_id=637430899033762591-2976486754&p=tls&hl=zh-Hans&rd=1