Postfixサーバーへの接続は暗号化されていますか?

Postfixサーバーへの接続は暗号化されていますか?

Thunderbirdクライアントを使用して、ポート25(SMTP)で実行されているPostfixサーバーを介してメールを送信したいと思います。

認証され暗号化された接続が必要です。

私は次の文書に従いました。

構成は簡単です。

$ sudo apt install libsasl2-modules sasl2-bin
$ sudo saslpasswd2 -c -u example.com yugiohjcj
$ sudo sasldblistusers2

$ sudo vim /etc/postfix/sasl/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5

$ sudo vim /etc/postfix/main.cf
# SASL
cyrus_sasl_config_path = /etc/postfix/sasl
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

$ sudo bash /etc/init.d/postfix restart

Thunderbirdの設定方法は次のとおりです。

  • 編集>アカウント設定>送信サーバー(SMTP)
  • サーバー名:example.com
  • ポート: 25
  • 接続セキュリティ:STARTTLS
  • 認証方法:一般パスワード
  • ユーザー名:[Eメール保護]

Thunderbirdからメールを送信すると、Postfixログに次の情報が表示されます。

postfix/smtpd[103272]: connect from 1.2.3.4.subs.proxad.net[1.2.3.4]
postfix/smtpd[103272]: 39AB821458: client=1.2.3.4.subs.proxad.net[1.2.3.4], sasl_method=PLAIN, [email protected]
postfix/cleanup[103276]: 39AB821458: message-id=<[email protected]>
opendkim[72092]: 39AB821458: DKIM-Signature field added (s=2023, d=example.com)
postfix/qmgr[102890]: 39AB821458: from=<[email protected]>, size=690, nrcpt=1 (queue active)
postfix/smtpd[103272]: disconnect from 1.2.3.4.subs.proxad.net[1.2.3.4] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
postfix/smtp[103277]: 39AB821458: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[64.233.184.26]:25, delay=0.7, delays=0.08/0.01/0.31/0.3, dsn=2.0.0, status=sent (250 2.0.0 OK  1678874625 bh21-20020a05600c3d1500b003da0d302eb6si1264054wmb.27 - gsmtp)
postfix/qmgr[102890]: 39AB821458: removed

したがって、メールは私のPostfixサーバーから受信し、期待どおりに@ gmail.comアドレスに転送されます(私は~/.forwardこれにファイルを使用します)。

ただし、暗号化については何も表示されません。

Postfixサーバーへの接続は暗号化されていますか?

そうでなければ、どのように解決できますか?

ありがとうございます。

ありがとうございます。

ベストアンサー1

postfix/smtpd[103272]: connect from 1.2.3.4.subs.proxad.net[1.2.3.4]
postfix/smtpd[103272]: 39AB821458: client=1.2.3.4.subs.proxad.net[1.2.3.4], sasl_method=PLAIN, [email protected]
[...]
postfix/smtpd[103272]: disconnect from 1.2.3.4.subs.proxad.net[1.2.3.4] ehlo=2 starttls=1 [...]

ここでstarttls=1接続にTLSが有効であることを確認してください。

Postfix設定に次の設定を追加する必要がありますmain.cf

smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous

これは、認証方法をTLS暗号化接続にハッシュされていないパスワード(LOGINとPLAIN)のみを渡すことを制限します。暗号化されていない接続では、ハッシュ形式でパスワードを送信するCRAM-MD5およびDIGEST-MD5のみが許可されます。

または、以下を設定できます。

smtpd_tls_auth_only = yes

認証は、TLS暗号化が最初に設定されている場合にのみ許可されます。

引用:Postfix SASL Howto、SASLセキュリティオプション

おすすめ記事