送信メールのPostfix TLS暗号化

送信メールのPostfix TLS暗号化

これは私のpostfix main.cnf設定ファイルです。

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_sasl_security_options = noanonymous
smtpd_tls_loglevel = 1
smtpd_tls_auth_only = yes
smtp_tls_ciphers = export
smtp_tls_security_level = encrypt

smtp_tls_note_starttls_offer = yes
smtpd_tls_cert_file=/etc/ssl/certs/smtpd.crt
smtpd_tls_key_file=/etc/ssl/private/smtpd.key
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
myhostname = 4051.localdomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, 4051.localdomain, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

電子メールを送信しようとすると、次のエラーが発生します。

Aug 23 15:23:08 4051 postfix/qmgr[31284]: 7BC223100C2D: from=<[email protected]>, size=931, nrcpt=1 (queue active)
Aug 23 15:23:08 4051 postfix/smtp[31344]: 7BC223100C2D: TLS is required, but was not offered by host gmail-smtp-in.l.google.com[74.125.195.27]
Aug 23 15:23:09 4051 postfix/smtp[31344]: 7BC223100C2D: TLS is required, but was not offered by host alt1.gmail-smtp-in.l.google.com[173.194.221.26]
Aug 23 15:23:10 4051 postfix/smtp[31344]: 7BC223100C2D: TLS is required, but was not offered by host alt2.gmail-smtp-in.l.google.com[74.125.68.26]
Aug 23 15:23:11 4051 postfix/smtp[31344]: 7BC223100C2D: TLS is required, but was not offered by host alt3.gmail-smtp-in.l.google.com[64.233.189.26]
Aug 23 15:23:13 4051 postfix/smtp[31344]: 7BC223100C2D: to=<[email protected]>, relay=alt4.gmail-smtp-in.l.google.com[173.194.72.26]:25, delay=487, delays=482/0.04/4.4/0, dsn=4.7.4, status=deferred (TLS is required, but was not offered by host alt4.gmail-smtp-in.l.google.com[173.194.72.26])

Gmailは暗号化されたメールをサポートしていると確信していますが、問題の考えられる原因は何ですか?

ベストアンサー1

Cisco IOSファイアウォールの場合:

上記のStephen Harrisのコメントに感謝します。

Telnet 出力に STARTTLS が表示されない場合、postfix が実行する操作により TLS が正しく動作しません。低レベルのデータフローの問題があります。

私はCisco IOS v 15.1でCisco 2851を使用しています。私の解決策はesmtpチェックフィルタを修正することでした。これを読んでください:SMTPのアプリケーション検査と制御。たとえば、EHLOコマンドを250-STARTTLSXXX's:に置き換えます250-XXXXXXXX

show running-configesmtpを含むアクティブフィルタのリストは、ルータのコマンドラインに表示されます。

ip inspect name APPWIZ http
ip inspect name APPWIZ https
ip inspect name APPWIZ tcp
ip inspect name APPWIZ udp
ip inspect name APPWIZ sip
ip inspect name APPWIZ pop3
ip inspect name APPWIZ imap
ip inspect name APPWIZ icmp
ip inspect name APPWIZ ftp
ip inspect name APPWIZ dns
ip inspect name APPWIZ esmtp

私にとって即時の解決策は、次のようにesmtpチェックを無効にすることでした(適切に設定できるまで)。

configure terminal
no ip inspect name APPWIZ esmtp
exit
write memory

APPWIZ名前を検査クラスマップに変更する必要があります。

おすすめ記事