Postfix

Postfix - gmail 加密

  • September 15, 2017

我的伺服器在 Ubuntu 14.04 上執行,並且我安裝了 Postfix。當我向我的 gmail 帳戶發送內容時,它會進入垃圾郵件。我設置了 SPF、DKIM 和 DMARC,這是一個確認:

Authentication-Results: mx.google.com;
  dkim=pass header.i=@mydomain.com;
  spf=pass (google.com: domain of office@mydomain.com designates xxx.xxx.xx.xxx as permitted sender) smtp.mailfrom=office@mydomain.com;
  dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mydomain.com

但是有一個紅色的掛鎖說:encryption: mydomain.com did not encrypt this message

其他人的電子郵件有這樣的註釋:encryption: Standard (TLS)

你能幫我一下嗎,我該怎麼辦?這可能是來自我伺服器的電子郵件進入垃圾郵件的原因嗎?提前致謝。

我的/etc/postfix/main.cf

biff = no
append_dot_mydomain = no
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.com, bociuch, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301

您缺少該smtp_tls_security_level指令。

smtp_tls_security_level = may

這會將其設置為機會性 TLS,如果伺服器支持,則使用加密連接,但如果伺服器不支持,則允許未加密連接。

smtp_tls_security_level的預設值為none

引用自:https://serverfault.com/questions/853355