web-dev-qa-db-ja.com

Gmailリレーを使用したPostfix:STARTTLSコマンドを最初に発行する必要があります

次のエラーが表示されます:最初にSTARTTLSコマンドを発行する必要がありますすべての送信メールで。

誰でもその理由を見ることができますか?

main.cf:

relayhost=[smtp.gmail.com]:587
smtp_connection_cache_destinations= [smtp.gmail.com]:587

#TLS parameters
smtpd_use_tls = yes
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_note_starttls_offer = yes
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
smtp_tls_security_level = encrypt
# SASL Configuration
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_enforce_tls = no
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_sasl_tls_security_options = noanonymous

tls_policy

[smtp.gmail.com]:587 encrypt

sasl_passwd

smtp.gmail.com:587 [email protected]:password

そして、はい、すべてのデータファイルでpostmapを実行し、変更後にpostfixをリロードしました。

TIA

4
user312837

PostfixがAUTHを発行しようとしているようですbeforeSTARTTLSを発行しています(-> STARTTLSを発行していません)。 AFAIK Gmailは、STARTTLSの後のみ、ポート25および587でSMTP AUTHを提供します。

smtp_use_tls=yesを追加した後、postfixデーモンを再起動しましたか?

http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html

3
AnFi

smtp_enforce_tls = yesを使用する必要があります

2
Alexander