大网数据广告活动
服务器运维问答

Gmail flagging Dovecot email as insecure

· 52CE 我爱测

I thought I successfully secured my Postfix/Dovecot email server. I have a signed certificate from LetsEncrypt, which is valid for my domain. Sending & receiving works fine, but since Gmail started flagging insecure emails, all m…

问题原文

原帖链接 · gavanon · CC BY-SA 3.0

I thought I successfully secured my Postfix/Dovecot email server. I have a signed certificate from LetsEncrypt, which is valid for my domain.

Sending & receiving works fine, but since Gmail started flagging insecure emails, all mail sent from my server are flagged as unencrypted.

Gmail users see "This message wasn't encrypted", like this:

In Postfix's main.cf, among other settings, I have:

# SASL, for SMTP authentication
smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_path = private/auth

# TLS, for encryption
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/letsencrypt/live/mydomain.com/chain.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/mydomain.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mydomain.com/privkey.pem
tls_random_source = dev:/dev/urandom
smtpd_client_new_tls_session_rate_limit = 10
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_exclude_ciphers =
    EXP
    EDH-RSA-DES-CBC-SHA
    ADH-DES-CBC-SHA
    DES-CBC-SHA
    SEED-SHA
smtpd_tls_dh512_param_file = ${config_directory}/certs/dh_512.pem
smtpd_tls_dh1024_param_file = ${config_directory}/certs/dh_1024.pem
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_delay_reject = yes

In Postfix's master.cf, among other settings, I have:

smtp      inet  n       -       -       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_use_tls=yes
  -o smtpd_tls_security_level=encrypt

submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o broken_sasl_auth_clients=yes

In Dovecot's 10-ssl.conf, among other settings, I have:

ssl = required
ssl_ca = </etc/letsencrypt/live/mydomain.com/chain.pem
ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem

Is Gmail falsely flagging LetsEncrypt certificates because it doesn't trust them, or is my email really being sent unencrypted?

已采纳解答

原帖链接 · gavanon · CC BY-SA 3.0

I solved this by adding both these lines to Postfix's main.cf:

smtp_tls_security_level = may
smtpd_tls_security_level = may

(I had only set smtpd_tls_security_level because of a misleading article that said all smtp_ values were depreciated in favour of smtpd_.)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。