STARTTLS テスト
お使いのメールサーバーがSTARTTLSに対応しており、転送中のメールを暗号化しているかどうかを確認してください。ドメイン名を入力すると、すべてのMXサーバーについて、STARTTLSの対応状況、TLSのバージョン、証明書の有効期限、SMTP通信の全内容に加え、MTA-STS、TLS-RPT、DANEの設定状況も確認できます。
STARTTLS テストの仕組み
このテストは、Gmail や Outlook、その他の送信者があなたにメールを配信する際や、メールアプリがメールを送信・閲覧する際と同じ方法で、あなたのメールサーバーと通信します。
1
メールサーバーを確認する
ポート25のドメインについては、そのMXレコードを検索し、優先順位に従ってすべてのサーバーを一度にテストします。ホスト名は、ポート25、587、143、または110で個別にテストされます。
2
ハンドシェイクを実行する
接続し、挨拶を待ち、送信する EHLO, それを確認してください STARTTLS が提供されている場合は、接続をTLSにアップグレードし、サーバーが何を提供しているかを再度確認します。メッセージは送信されず、何もログに記録されません。
3
暗号化を確認してください
TLSのバージョンと暗号スイートを記録し、TLS 1.0および1.1を試行し、証明書の有効性を検証し、各サーバーのリバースDNSを確認し、各サーバーから提示された情報と照らし合わせて、MTA-STSポリシー、TLS-RPTレコード、およびDANEレコードをチェックします。
STARTTLS テストで確認される事項
メールサーバー間の暗号化は、1つの設定だけでなく、複数の設定によって決まります。以下は、あなたのドメイン宛てのメールが暗号化されるかどうか、また送信者が暗号化を要求できるかどうかを決定する確認事項です。
サーバーに以下の項目が掲載されているかどうか STARTTLS その後 EHLO そして、そのコマンドに対して次のように応答します。 220、会話の全容が文字起こしとして掲載されています。その提案を隠すファイアウォール(XXXXXXXA) が指定されます。
サーバーが選択するプロトコルと暗号方式、および非推奨となったTLS 1.0および1.1を引き続き受け入れるかどうかについて、それぞれ独自のハンドシェイクを用いて検証しました。
日付、ホスト名、信頼できるルートへのチェーン、鍵、および署名。ポート25では、MTA-STSの強制設定により送信者に証明書の確認が義務付けられていない限り、無効な証明書は警告として扱われます。一方、ポート587、143、110ではメールアプリが証明書を確認するため、送信に失敗します。
あなたの _mta-sts レコード、送信者が取得するのと同じ方法で取得されたポリシーファイル、すべてのMXサーバーが対象に含まれており、チェックに合格しているかどうか、そしてあなたの _smtp._tls レコードはTLSレポートを送信します。
TLSAの記録は _25._tcp 各MXサーバーについて、DNSSECによる検証を行い、そのサーバーが提示した証明書と照合し、その証明書に対して公開すべきレコードを確認します。
送信サーバー、IMAPサーバー、POP3サーバーのいずれにおいても、STARTTLSの前にメールアプリがログインできるかどうか(その場合、パスワードが平文で送信されることになる)、および暗号化後にどのような機能が提供されるか。
STARTTLSとは何ですか?
STARTTLS は、平文の電子メール接続を暗号化された TLS 接続にアップグレードするコマンドです。RFC 3207 で SMTP 向けに定義されており、ポート 25 のメールサーバーおよびポート 587 のメールクライアントが、最初は暗号化なしで接続を開始し、メッセージ本文が送信される前に暗号化に切り替えることを可能にします。IMAP および POP3 でも、ポート 143 および 110 において同様のアップグレードが行われます。
アップグレードが完了すると、メッセージ、そのヘッダー、および添付ファイルは2つのサーバー間で暗号化されて送信されるため、ネットワーク上でその内容を読み取ることはできません。
サーバー間でのSTARTTLSはオプションです。これが欠落しているか、失敗した場合、ほとんどの送信者はメッセージを拒否するのではなく、プレーンテキストで配信します。
ネットワーク上の攻撃者は、STARTTLSオファーを削除することで、メールが暗号化されずに送信されるように仕向けることができます。MTA-STSとDANEはこの脆弱性を解消します。
MTA-STS を確認 →
STARTTLS 対 SSL/TLS:各プロトコルが使用するポート
STARTTLSは、平文で開始された接続をアップグレードします。電子メールクライアントではしばしば「SSL/TLS」と表示される暗黙的なTLSは、最初のバイトから暗号化を行います。暗号化が開始されると、どちらも同じTLSプロトコルを使用します。このテストではSTARTTLSのポートを対象としており、SSL証明書チェッカーでは暗黙的なTLSのポートを対象としています。
OpenSSL を使用して STARTTLS をテストする方法
ターミナルから同じチェックを実行することもできます。多くのインターネットプロバイダは、家庭用回線において送信ポート25をブロックしているため、タイムアウトした場合はサーバーから実行してください。
# MXサーバーを検索する
dig+short MX example.com
# ポート25でSTARTTLSをテストし、証明書を表示する
openssl s_client-starttls smtp -connect mx1.example.com:25 \
-servername mx1.example.com -crlf
# 送信ポート、IMAP、POP3
openssl s_client-starttls smtp -connect smtp.example.com:587 -crlf
openssl s_client-starttls imap -connect imap.example.com:143
openssl s_client-starttls pop3 -connect pop.example.com:110
# STARTTLS が提供されているか確認(250-STARTTLS があるか確認)
ncmx1.example.com 25
EHLO test.example.org
稼働中のサーバーの様子
250-STARTTLS → 220 Ready
その後 EHLO, サーバーはその拡張子を一覧表示します。 250-STARTTLS これは、暗号化に対応していることを意味します。クライアントが STARTTLS, a 220 この応答により、TLSハンドシェイクを開始できるようになります。A 454 返信がある場合や、STARTTLS 行がない場合は、送信者はそのサーバーに暗号化されていない状態で送信することになります。
STARTTLSによくある問題とその解決方法
これらは、テストでメールサーバーにおいて最も頻繁に発見される問題点と、それぞれの対処法です。
STARTTLS が提供されていませんサーバーはSTARTTLSをアドバタイズしていません
このサーバーへのすべてのメッセージはプレーンテキストで送信されます。これは、証明書の有効期限が切れて管理者がTLSを無効にした場合や、古いアプライアンスで使用されている場合に、よく見られる現象です。
メールサーバーに証明書をインストールし、TLSを有効にしてください(Postfixの場合は、 smtpd_tls_security_level = may).
ハンドシェイクに失敗しましたSTARTTLS が提供されているが、TLS が失敗する
サーバーはコマンドを受け付けますが、ハンドシェイクが失敗します。その原因としては、証明書ファイルの欠落、鍵の不一致、あるいは共通のTLSバージョンや暗号スイートがないことが挙げられます。
メールサーバーのTLSログを確認し、証明書と鍵のパスを確認した上で、TLS 1.2および1.3を有効にしてください。
ファイアウォールによって隠されているEHLO が STARTTLS の代わりに XXXXXXXA を表示する
SMTP検査機能を備えたファイアウォールはこの提案を無視するため、送信者はそれを確認できず、背後のサーバーがTLSに対応していても、プレーンテキストで配信されてしまいます。
ESMTP 検査を無効にする(Cisco ASA: no inspect esmtp) または、STARTTLS を許可する。
信頼されていない証明書自己署名証明書、有効期限が切れた証明書、または不一致の証明書
悪意のある送信者による配信は依然として行われますが、MTA-STS および DANE には有効な証明書が必要です。MTA-STS が強制モードになっている場合、配信は失敗します。
MXホスト名が含まれるSANを持つ公的CAの証明書を使用し、更新を自動化する。
古いTLSバージョンTLS 1.0 または 1.1 は引き続き受け入れられます
どちらも非推奨となっています(RFC 8996)。現在の送信者は TLS 1.2 または 1.3 をネゴシエートしますが、古いバージョンをそのままにしておくと、サーバーのセキュリティが弱まります。
サーバーのTLSプロトコル設定で、TLSv1およびTLSv1.1を無効にしてください。
暗号化の前にログインしてくださいメールアプリは、STARTTLSの前にログインできる
ポート587、143、110において、暗号化の前にログインを要求するサーバーでは、設定ミスのあるアプリがパスワードを平文で送信してしまう可能性があります。
STARTTLS 実行後のみログインを許可する(Postfix: smtpd_tls_auth_only = yes; Dovecot: disable_plaintext_auth = yes).
MTA-STSなし送信者は暗号化を義務付けることはできません
MTA-STSポリシーがない場合、送信サーバーは、あなたのドメインがTLSを要求していることを知る術がないため、ダウングレード攻撃が見過ごされてしまいます。
MTA-STSポリシーを公開し、テストモードで開始してから、適用モードに切り替えます。ホスト型MTA-STSが、ポリシーファイルを自動的に提供します。
TLS-RPTなしTLSの障害についてはあまり耳にしない
送信者がサーバーとTLS接続を確立できない場合、その問題を報告する先がないため、問題は表面化しないままになります。
TLS-RPTレコードを公開する (_smtp._tls.example.com) 毎日のレポートを受け取るには。 TLS-RPTについて学ぶ.
よくあるご質問
STARTTLSとは何ですか?
STARTTLS は、平文接続を暗号化された TLS 接続にアップグレードするコマンドです。メールサーバーは EHLO への応答にこのコマンドを記載し、クライアントが STARTTLS を送信すると、メッセージデータが送信される前に双方が TLS ハンドシェイクを実行します。これは、SMTP については RFC 3207 で、IMAP および POP3 については RFC 2595 で定義されています。
STARTTLSは安全ですか?
TLSハンドシェイクが完了すれば、その接続は他のTLS接続と同様に安全です。弱点はアップグレードそのものにあります。サーバー間でのSTARTTLSはオプションであるため、接続を改ざんできる攻撃者は、STARTTLSのオファーを削除し、平文での通信を強制することが可能です。MTA-STSとDANEは、このようなダウングレードを防ぎます。
STARTTLSとSSL/TLSの違いは何ですか?
どちらも同じTLS暗号化を使用しています。STARTTLSは暗号化されていない状態で開始し、ポート25、587、143、110で接続をアップグレードします。メールクライアントではしばしばSSL/TLSと表示される暗黙的なTLSは、ポート465、993、995において最初のバイトから暗号化を行います。これらのポートを確認するには、
SSL証明書チェッカーをご利用ください。
STARTTLS はどのポートを使用しますか?
電子メールの場合、サーバー間での配信にはポート 25 で STARTTLS が使用され、メールクライアントによる送信にはポート 587 で STARTTLS が使用されます。IMAP(ポート 143)および POP3(ポート 110)でも STARTTLS を使用できます。一方、ポート 465、993、995 では、暗黙的な TLS が使用されます。
「最初にSTARTTLSコマンドを発行しなければならない」とはどういう意味ですか?
これはSMTPエラーであり、通常は 530 5.7.0、ログインやメッセージの受信前に暗号化を必要とするサーバーからの場合です。お使いのメールクライアントやアプリが、TLSを使用せずに接続しています。クライアントの送信サーバー設定でSTARTTLS(またはTLS)を有効にしてポート587を使用するか、ポート465でSSL/TLSに切り替えてください。
STARTTLSは電子メールをエンドツーエンドで暗号化しますか?
いいえ。STARTTLS はサーバー間の各ホップを暗号化するため、メッセージは転送中は保護されますが、通過するサーバー上では暗号化されていない状態で保存されます。エンドツーエンドの暗号化を行うには、S/MIME または PGP を使用してください。
なぜポート25でのSTARTTLSテストでタイムアウトが発生するのでしょうか?
ポート25でメールサーバーに接続できない(ファイアウォール、MXレコードの設定ミス、サーバーのダウンなど)か、テストを行っているネットワーク側でポート25からの送信がブロックされているかのいずれかです。多くの家庭向けインターネットプロバイダやクラウドプラットフォームでは、スパムを防ぐためにこれをブロックしています。このテストはポート25が開いているサーバーから実行されており、「接続拒否」以外の場合は「応答なし」と表示されます。
なぜ私のメールサーバーは、自己署名証明書でも正常に動作するのでしょうか?
ポート25では、ドメインが「enforce」モードのMTA-STSポリシーまたはDANEレコードを公開していない限り、送信サーバーは証明書を確認せずに暗号化を行います。そのため、このテストでは、MXサーバーの証明書に関する問題が警告として表示されますが、そのサーバーがMTA-STSの「enforce」モードの対象となっている場合は、失敗として表示されます。一方、ポート587、143、110では、メールアプリが証明書を確認するため、同じ問題が発生すると失敗となります。
EHLOの応答における「XXXXXXXA」とはどういう意味ですか?
SMTP検査機能を備えたファイアウォール(通常はCisco ASAやPIX)が、STARTTLSキーワードを「X」に置き換えてしまいました。これにより、送信サーバーはオファーを認識できなくなったため、平文で送信するようになりました。ファイアウォールのESMTP検査機能を無効にしてください(no inspect esmtp) または、その経由で STARTTLS を許可する。
OpenSSL を使って STARTTLS をテストするにはどうすればよいですか?
実行 openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com -crlf. OpenSSLは自動的にEHLOとSTARTTLSを送信し、その後、証明書チェーン、プロトコル、および暗号スイートを出力します。次のコマンドを使用してください。 -starttls imap ポート143で、および -starttls pop3 ポート110で。
MTA-STSとは?
MTA-STS (RFC 8461) を使用すると、ドメイン側は送信サーバーに対し、記載された MX サーバーへのメール配信には、有効な証明書を用いた TLS 経由で行う必要があることを通知できます。この仕様をサポートする送信サーバーは、STARTTLS が欠如している場合や証明書が無効な場合には配信を拒否するため、ダウングレード攻撃や傍受攻撃を防ぐことができます。
TLS-RPTとは何ですか?
TLS-RPT(RFC 8460)は、送信サーバーに対し、ドメインへのTLS接続の失敗に関する日次レポートを電子メールまたはHTTPS経由で送信するよう依頼するDNSレコードです。これにより、STARTTLS、証明書、またはMTA-STSの問題によって暗号化された配信が妨げられている場合を把握することができます。
暗号化を任意ではなく、必須とする
STARTTLSだけでは、攻撃者によって削除される可能性があります。PowerDMARCのホスト型MTA-STSおよびTLS-RPTを利用すれば、ポリシーファイルを自社でホストすることなく、ドメインへの暗号化された配信を強制し、TLSが失敗した際にアラートを送信します。
Enter a domain or mail server, for example example.com.
Please enter a valid domain or host name (e.g. example.com).
This test connects over IPv4. Enter a domain, a host name or an IPv4 address.
Only ports 25, 587, 143 and 110 can be tested here. For ports 465, 993 and 995, use the SSL Certificate Checker.
Enter a real host name, not a wildcard.
Network error. Could not reach the STARTTLS test. Please try again.
The test failed. Please try again.
Please enter a valid domain or host name (e.g. example.com).
This test connects over IPv4. Enter a domain, a host name or an IPv4 address.
This address is private or reserved, so the test can't reach it.
Too many tests from your network. Please wait a minute and try again.
The test is busy right now. Please try again in a moment.
A test from your network is already running. Please wait for it to finish.
The test is not available right now. Please try again later.
Open the SSL Certificate Checker
We couldn't find {host} in DNS. Check the spelling.
The DNS lookup for {host} failed. Please run the test again.
{host} has no MX record and no IPv4 address, so it can't receive email.
The test failed. Please try again.
e.g. example.com
e.g. smtp.gmail.com
e.g. outlook.office365.com
e.g. outlook.office365.com
STARTTLS test for
Port 25 · incoming mail
Port 587 · submission
Port 143 · IMAP
Port 110 · POP3
1 MX server
{n} MX servers
{n} tested
DNSSEC-signed MX
STARTTLS works on every mail server
Every MX server offers STARTTLS, completes the TLS handshake and presents a valid certificate.
STARTTLS works on every mail server that answered
{n} of {m} MX servers took the test and passed. The others didn't answer this time: see below.
STARTTLS works on {host}
The server offers STARTTLS, completes the TLS handshake and presents a valid certificate.
STARTTLS works, with 1 warning
STARTTLS works, with {n} warnings
Mail is encrypted, but fix the items below to keep it that way.
STARTTLS problem found (1)
STARTTLS problems found ({n})
Some mail may travel unencrypted or not be delivered at all. Start with the items marked Fix first.
The mail servers couldn't be tested
No server took a complete test session this time. Each server below says why.
{host} accepts no email
Its MX record is a null MX (RFC 7505): the domain says it receives no mail, so there is nothing to test.
Some checks couldn't finish this time. Run the test again for a complete result.
Mail for {domain} is hosted by {provider}. Mail apps connect to {host} on port {port}.
Mail for {domain} is hosted by {provider}, which takes no STARTTLS connections on port {port}. Its mail apps use implicit TLS on port 465, 993 or 995.
Mail for {domain} is received by {mx}.
Your mail provider's setup guide names the host that mail apps connect to.
Test {host}
STARTTLS
Lowest TLS version
TLS version
MTA-STS
TLS-RPT
DANE
Certificate
Test time
{n} of {m}
Offered
Not offered
Not tested
{n} days left
Expired
{n} s
Enforce
Testing
Off
Broken
Unknown
Not set
Missing
Enabled
Invalid
Valid
Not used
Failing
Partly
Unknown
Check
Result
Status
Pass
Warning
Fail
Info
{n} passed
{n} failed
1 warning
{n} warnings
{n} info
Total: {list}
Domain checks
Transport security policies for {domain}
MTA-STS record and policy
TLS-RPT record
Mail servers
Mail server
MX {n}
Checks
MX records
MTA-STS
TLS-RPT
DANE (TLSA)
DNS address
Test session
Connection
Greeting
STARTTLS
Before the handshake
TLS handshake
TLS version
Cipher
Certificate expiry
Certificate hostname
Certificate chain
Key strength
Signature algorithm
Login before encryption
After encryption
DANE key rollover
Reverse DNS (PTR)
1 MX record
{n} MX records
{n} MX records, the first {m} tested
No MX record: mail goes to {host} itself
Some MX records are IP addresses or invalid names, which senders skip
No usable MX record: each one is an IP address or an invalid name
Null MX: the domain accepts no email
Enforce mode: senders deliver only over TLS with a valid certificate
Enforce mode, but some servers fail it: senders won't deliver to them
Testing mode: senders report failures but still deliver
Testing mode, and some servers would fail in enforce mode
The policy is switched off (mode: none)
No MTA-STS: senders can't require TLS, so a downgrade attack goes unnoticed
No MTA-STS, but DANE protects every server
A policy file exists, but no _mta-sts TXT record announces it, so senders never fetch it
The _mta-sts TXT record is invalid, so senders ignore the policy
The record is there, but senders can't use the policy: {why}
The MTA-STS lookup failed
The record is there, but the policy couldn't be read from here: {why}. Run the test again.
The record is there, but the policy host has only IPv6 addresses and this test connects over IPv4, so the policy wasn't checked
Reports go to {rua}
The record is invalid, so senders may send no reports
More than one TLS-RPT record: senders send no reports
No TLS-RPT record: you won't hear about failed TLS connections
The TLS-RPT lookup failed
No TLS-RPT record, although MTA-STS is in place: you won't hear about failed TLS connections, and in testing mode senders report only to a domain with TLS-RPT
No TLS-RPT record, although DANE is in place: you won't hear when senders can't verify your servers
Every tested server matches its TLSA records
A server's certificate doesn't match its TLSA records: DANE senders won't deliver to it
TLSA records fail DNSSEC validation: DANE senders hold the mail
TLSA lookups fail: DANE senders hold the mail
The TLSA records use types mail servers ignore
The MX records aren't DNSSEC-signed, so senders don't use DANE for this domain
Some servers use DANE, others don't
Not used. DANE is optional: it pins your mail servers' certificates in DNS and needs DNSSEC. MTA-STS is the more widely supported option.
Not used, although the MX records are DNSSEC-signed
TLSA records exist, but no server could be tested
The TLSA lookups didn't answer
TLSA records exist, but senders ignore them: the records or the servers' addresses aren't DNSSEC-validated
{host} doesn't exist in DNS
{host} has no IPv4 address
{host} has only IPv6 addresses, and this test connects over IPv4
{host} points to a private address ({ip}), which senders can't reach
The DNS lookup for {host} failed
Not tested: this server was tested many times in the last minute
Not finished: the test ran out of time
The server sent far more data than a mail server sends
The test session failed
Connection refused on port {port}: no mail server listens there
No answer on port {port}: a firewall may block it, or the server is down
{ip} can't be reached
The connection to {ip} failed
The server refused our connection: {reply}
The server took the connection but never greeted
The server closed the connection before greeting
Port {port} doesn't answer like a mail server: {banner}
The IMAP server logged us in without a password (PREAUTH), where STARTTLS isn't allowed
Offered and accepted: {reply}
A firewall hides the offer (XXXXXXXA), so senders deliver in plain text. The server itself accepts STARTTLS
A firewall hides the offer (XXXXXXXA) and blocks the command: {reply}
Not offered: the server's answer to {cmd} doesn't list {stls}
Offered, but the command was refused: {reply}
Offered, but the server didn't answer the command
Offered, but the server closed the connection at the command
The server only speaks old SMTP (HELO), which has no STARTTLS
The server's answer to {cmd} isn't valid
The server refused our {cmd}: {reply}
The server didn't answer our {cmd}
The server closed the connection at our {cmd}
The server sent data in plain text after agreeing to STARTTLS. The test ignored it.
Completed in {ms} ms
The handshake failed: {detail}
No TLS version or cipher in common with a current client: {detail}
The server closed the connection during the handshake
The handshake didn't finish in time
The server agreed to STARTTLS, then didn't speak TLS
{proto}, TLS 1.0 and 1.1 refused
{proto}
{proto}, but {old} still accepted
{proto} negotiated (deprecated)
TLS 1.0 and 1.1 tested on the first 6 servers only
TLS 1.0 and 1.1 not tested
and
{cipher}
{cipher} (an older CBC cipher)
{cipher}: no forward secrecy
{cipher}: a broken cipher
Unknown
Not valid until {date}
Expired {date} (1 day ago)
Expired {date} ({n} days ago)
Expires {date} (today)
Expires {date} (1 day left)
Expires {date} ({n} days left)
Valid until {date} ({n} days left)
{host} = {name}
{host} != {names}
{host} != no DNS names on the certificate{cn}
+{n} more
Complete and trusted (1 certificate sent)
Complete and trusted ({n} certificates sent)
The chain is complete, but trust can't be confirmed while the certificate is outside its validity dates
Incomplete chain: the server doesn't send the intermediate certificate
Self-signed certificate
The chain ends at an untrusted root
A certificate in the chain doesn't match the one that should sign it
An intermediate certificate in the chain has expired
The certificate isn't issued for TLS servers
Not trusted: the chain failed verification
The chain couldn't be verified this time
The server didn't send a certificate
{type} {bits}-bit
A TLSA record matches the certificate
No TLSA record matches the certificate: DANE senders won't deliver here
The TLSA records use types mail servers ignore (PKIX)
The TLSA records fail DNSSEC validation: DANE senders hold the mail
The TLSA lookup fails: DANE senders hold the mail
The TLSA lookup didn't answer
No TLSA records
TLSA records exist, but they aren't DNSSEC-signed, so senders ignore them
The MX records aren't DNSSEC-signed, so senders don't use DANE for this domain
The server's address isn't DNSSEC-signed, so senders don't use DANE for it
TLSA records exist, but the server couldn't be tested
A second key is pinned too (the next key, or your CA's), so a key change won't break DANE
Only the current key is pinned: publish the next key's record before you change keys
The record pins the whole certificate (3 0 x), so it has to change at every renewal
{name}, which points back to {ip}
{name} points back to {ip}, but the greeting names {banner}
{name} doesn't point back to {ip}
No PTR record for {ip}
The reverse DNS lookup for {ip} fails
The reverse DNS lookup for {ip} didn't answer in time
Not checked: the test ran out of time
Covered by {pattern}, and the certificate is valid
Not listed in the MTA-STS policy
Covered by {pattern}, but the certificate fails MTA-STS validation
Offered before encryption: {methods}
Only after encryption
No login offered
Disabled until encryption (LOGINDISABLED)
No login before encryption
No login before encryption
Unknown: the server doesn't support the CAPA command
{stls} is offered again after encryption (RFC 3207 forbids it)
The server hung up right after the handshake
The server didn't answer after the handshake
The server refused {cmd} after the handshake
How to fix
Fix first
Fix soon
Optional
{hosts}:
All {n} servers:
Make sure a mail server listens on port {port}, or fix the record that points to this host.
Port {port} on this host doesn't run a mail server. Point the record at your mail server.
Turn on STARTTLS: install a certificate and enable TLS in the mail server (Postfix: smtpd_tls_security_level = may; Exchange: assign a certificate to the receive connector).
Turn on STARTTLS in the mail server with a valid certificate (Dovecot: ssl = yes).
The server offers STARTTLS but can't start TLS. Check its certificate and key files and its TLS logs.
Turn off ESMTP inspection on the firewall (Cisco ASA: no inspect esmtp) or let STARTTLS through, so senders see the offer.
Configure the server to answer EHLO (ESMTP). STARTTLS needs it.
Check what answers on this port: no mail server sends that much before STARTTLS. A misconfigured service or a proxy may sit in front of it.
Check the mail server's logs: it stops answering at STARTTLS.
Nothing may follow the server's yes to STARTTLS before the TLS handshake (RFC 3207, RFC 2595). Data there is a server bug or was injected on the network path: check both.
Check the TLS logs, the certificate and key paths, and enable TLS 1.2 and 1.3.
Enable TLS 1.2 and 1.3 with current ciphers (ECDHE with AES-GCM or ChaCha20).
Enable TLS 1.2 and 1.3, and disable TLS 1.0 and 1.1.
Disable {old}. Both are deprecated (RFC 8996), and current senders use TLS 1.2 or 1.3.
Prefer ECDHE key exchange, so recorded mail can't be decrypted later with the server's key.
Disable RC4, 3DES, NULL and export ciphers.
The certificate isn't valid yet. Check the server clock, or install the certificate that is currently valid.
Renew the certificate now and reload the mail server. Then check why automatic renewal didn't run.
Renew the certificate before it expires, and automate renewal so this doesn't become an outage.
Use a certificate whose Subject Alternative Names include the server's host name.
Reissue the certificate with every host name listed as a Subject Alternative Name.
Install the full chain (the certificate plus the intermediates). Your CA provides it as fullchain.pem or a CA bundle.
Replace the self-signed certificate with one from a public certificate authority. Let's Encrypt issues free certificates.
Use a certificate from a publicly trusted certificate authority.
Reinstall the certificate with the intermediate certificates your CA issued for it.
Replace the expired intermediate with the current one from your CA's bundle.
Request a certificate issued for TLS server authentication.
Make sure the server sends the full chain from a publicly trusted certificate authority.
Configure a certificate in the mail server's TLS settings.
Generate a new key of at least RSA 2048-bit or ECDSA P-256 and reissue the certificate.
SHA-1 and MD5 signatures are no longer trusted. Reissue the certificate with SHA-256.
Publish TLSA records that match the current certificate (suggested below) or remove the stale ones. Add the new record before every key change.
Use DANE-EE (3 1 1) or DANE-TA (2 1 1) records: mail servers ignore types 0 and 1.
Fix the DNSSEC signatures of the TLSA records. Until they validate, DANE senders hold the mail.
Fix the name servers so TLSA questions get an answer, even "no records". Until then, DANE senders hold the mail.
Add an mx: line for this server to the MTA-STS policy, or remove it from the MX records.
Fix this server's certificate. Under MTA-STS, senders refuse a server whose certificate doesn't validate.
Offer AUTH only after STARTTLS (Postfix: smtpd_tls_auth_only = yes).
Refuse plain-text logins before STARTTLS (Dovecot: disable_plaintext_auth = yes).
Stop listing STARTTLS after TLS has started (RFC 3207).
Point the MX records at host names (never IP addresses) of your mail servers.
Remove or fix the MX records that are IP addresses or invalid names.
Publish an MTA-STS policy. Start in testing mode, read the TLS reports, then switch to enforce.
Your MTA-STS policy is switched off. Set it to mode: testing, then enforce.
When the TLS reports show no failures, switch the policy to mode: enforce.
Fix the servers that fail MTA-STS before switching the policy to enforce.
Senders refuse the failing servers right now. Fix their certificates or the policy's mx lines.
Publish the TXT record _mta-sts.{host} with v=STSv1; id= and a new id, so senders fetch your policy.
Keep exactly one _mta-sts TXT record of the form v=STSv1; id=20260101 (up to 32 letters and digits).
Fix the policy file at {url}. Until senders can read it, they act as if there were none.
Run the test again. If the policy still can't be read, check that {url} answers quickly over IPv4 and IPv6.
Publish a TLS-RPT record at _smtp._tls.{host}, for example v=TLSRPTv1; rua=mailto:tls-reports@{host}
Fix the TLS-RPT record: v=TLSRPTv1 first, then rua= with mailto: or https: addresses.
Keep one TLS-RPT record at _smtp._tls.{host}: with several, senders send none.
Ask whoever runs the server's IP address (your hosting or mail provider) for a PTR record that names the server, and give that name an A record that points back.
Give the server's PTR name an A record that points back to its IP address, so the reverse DNS is forward-confirmed.
Publish a TLSA record for the next key (or a 2 1 1 record for your CA) well before you change keys or certificates, and remove the old one only after the change.
Pin the public key instead of the whole certificate (3 1 1, and keep the key when you renew), or publish the next certificate's record before each renewal.
Certificate
Connection
Common name (CN)
Issued by
Valid from
Valid until
Key
Signature
SHA-256 fingerprint
Server IP
Not tested
1 more IPv4 address
{n} more IPv4 addresses
1 IPv6 address
{n} IPv6 addresses
(the test connects to one IPv4 address per server)
Alias of
Greeting
Protocol
Cipher suite
Timing
connect {a} ms · greeting {b} ms · TLS {c} ms
Offered before encryption
Offered after encryption
Nothing listed
Host names covered (SANs)
No SANs listed
+{n} more
Certificate chain
Trusted
Not trusted
Server certificate
Intermediate
Root
Trusted root
Missing
Not sent
Expired
Issued by {name}
In the trust store
Expires {date}
Intermediate certificate
The server didn't send the certificate that links this chain to a trusted root.
Fetched from the CA to finish the checks
DANE: TLSA records at {name}
Record
Matches the server's certificate
Matches a certificate authority in the chain
Matches nothing on the server's certificate chain
Not used by mail servers
Wrong length for its type
Matches, but the chain to it doesn't verify
Matches, but the certificate doesn't name the server
Matches, but a certificate is outside its dates
TLSA records for this certificate
Publish one of these (3 1 1 pins the server's key, 2 1 1 its issuer's), in a DNSSEC-signed zone.
Conversation ({n} lines)
TLS handshake: {proto}, {cipher}
Test stopped here ({code})
{n} more lines not kept
encrypted
MTA-STS
TXT record
Policy file
Mode
Max age
MX patterns
MX coverage
Problems
Reports go to
None
{n} seconds ({d} days)
{host}: covered by {pattern}
{host}: not covered
Fetched ({type})
Redirects to {location}: senders don't follow redirects
Not found (HTTP 404)
HTTP {status} instead of the policy
Larger than 64 KB
Its HTTPS certificate has expired
Its HTTPS certificate doesn't cover the mta-sts host
Its HTTPS certificate is self-signed
Its HTTPS certificate isn't trusted
The HTTPS handshake failed
Nothing answers on port 443
No answer in time
Not fetched: the test ran out of time
The server closed the connection without an answer
Couldn't be fetched
The mta-sts host doesn't exist
The mta-sts host points to a private address
Not fetched
The DNS lookup for the mta-sts host failed
The mta-sts host has only IPv6 addresses, and this test connects over IPv4
A line isn't in the "key: value" form
An mx line isn't a host name or a *.zone pattern
A field appears twice (the first one counts)
version: STSv1 is missing
mode must be enforce, testing or none
max_age must be 0 to 31557600 seconds
max_age is under a day, so senders keep the policy only briefly
There is no mx line
Field names and values are case-sensitive (write mode: enforce, not Mode: Enforce)
The file starts with a byte-order mark, so the first line isn't read
It isn't served as text/plain
The id must be 1 to 32 letters and digits
The record must start with v=STSv1
There is more than one v=STSv1 record
The record must start with v=TLSRPTv1
rua= with a report address is missing
A report address isn't a valid mailto: or https: address
Tested {time} UTC from our server, which introduces itself as {helo}. Servers behind load balancers may answer differently on another connection.
Make encryption mandatory, not optional
STARTTLS alone can be stripped. Hosted MTA-STS and TLS-RPT enforce encrypted delivery to your domain and alert you when TLS fails.
Get hosted MTA-STS
Check MTA-STS
Testing, this can take up to 20 seconds.
Test finished. {verdict}