メインコンテンツまでスキップ

Mail, Directory and Database TLS (STARTTLS)

適用対象:
Mail: SMTP, IMAP, POP3Directory: LDAPDatabases: PostgreSQL, MySQL, MongoDB, Redis, CassandraQueues: Kafka, AMQPPost-quantum key exchange

Overview​

A standard TLS scan only works when the first byte on the wire is a TLS handshake, which covers HTTPS and little else. Mail, directory and most database protocols start with a short plaintext conversation and only then upgrade to TLS, and several databases and queues serve TLS on their own service port only when the operator enabled it.

This scan type (named starttls in the API and the CLI) handles both cases. Once the connection is ready for TLS, it runs the same certificate handshake and post-quantum key-exchange probe as a domain scan, so the results are directly comparable with your HTTPS endpoints. It sends no credentials and reads no data.

Supported protocols​

In-band upgrade​

A plaintext exchange precedes TLS. The scanner performs that exchange, then hands the connection to the TLS probes.

ProtocolDefault portUpgrade
SMTP (submission)587EHLO, then STARTTLS
IMAP143STARTTLS command
POP3110STLS command
LDAP389StartTLS extended operation (RFC 4511)
FTP21AUTH TLS
XMPP5222Stream header, then <starttls/>
PostgreSQL5432SSLRequest
MySQL / MariaDB3306Server handshake, SSL capability check, then SSL request

TLS on the service port​

These services speak TLS from the first byte when TLS is enabled, and plaintext when it is not. There is nothing to negotiate: the TLS handshake itself is the test.

ServiceDefault portNote
MongoDB27017Same port with or without TLS
Redis6379Same port with or without TLS (Redis 6+)
Kafka9093Dedicated SSL listener
AMQP (e.g. RabbitMQ)5671AMQPS; 5672 is the plaintext port
Cassandra9142CQL native TLS port
Implicit-TLS mail and directory ports

SMTPS (465), IMAPS (993), POP3S (995) and LDAPS (636) speak TLS from the first byte. Scan them with a domain / TLS scan on that port instead. If you point this scan at one of those ports, the result tells you so rather than reporting the host as unreachable.

What is reported​

ResultWhat it tells you
Post-quantum key exchangeThe TLS 1.3 group the server negotiates and whether it is post-quantum (for example the hybrid X25519MLKEM768), plus the post-quantum and classical groups the server accepts. A classical-only server is flagged so you can enable a hybrid group; a server without TLS 1.3 gets an explicit "could not be determined" rather than a guess.
TLS configurationNegotiated TLS version and cipher suite. TLS 1.2 is flagged because only TLS 1.3 carries a standardised hybrid key exchange; versions older than TLS 1.2 and cipher suites without forward secrecy are rated High.
Certificate chainThe server certificate and chain, with algorithms and key sizes, inventoried like any other TLS endpoint.
Cleartext serviceSee below: a service that refuses TLS is a Critical finding.

Cleartext is a finding, not a scan error​

SituationSeverity
The server answered but refused to upgrade (for example a mail server that does not offer STARTTLS)Critical: traffic to it is sent in cleartext
MongoDB or Redis: the port accepts TCP but completes no TLS handshakeCritical: the same port carries the cleartext traffic
Kafka, AMQP or Cassandra: the dedicated TLS port accepts TCP but completes no TLS handshakeHigh: the TLS listener is broken; check that clients are not falling back to the plaintext port
The server agreed to upgrade but the handshake failedInfo: TLS is offered, but its certificate could not be inventoried
The host did not answer, or answered as another protocolInfo: check the host, the port and the firewall rules

Every finding carries remediation guidance: enable TLS, reject unencrypted client connections, move to TLS 1.3, and configure a hybrid post-quantum key exchange. Database, queue and mail traffic is long-lived and often archived, which puts it squarely in "harvest now, decrypt later" scope.

When to use​

✉

Mail and directory estate

Answer 'is our mail and LDAP traffic quantum-vulnerable, or even encrypted at all?'

🗃

Databases and queues

Find database and message-queue endpoints that serve cleartext or lack a post-quantum key exchange

How to run​

From the Cockpit​

1

Open Run a Scan

In the Cockpit, go to Run a Scan.

2

Select the source

In Step 1 (Source), choose Mail, Directory & Data Services.

3

Configure and run

Enter one or more hosts (comma-separated), pick the protocol, and optionally override the port. Start the scan and review the findings.

The scan is sent from the Cockpit, so the targets must be reachable from it. For services on an internal network, run the scan with the scanner agent inside that network (see below).

Through the API​

curl -X POST "$COCKPIT/api/pqc/scans" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"scan_type": "starttls",
"target": "mail1.example.com,mail2.example.com",
"options": { "starttls_protocol": "smtp" }
}'
OptionDescriptionDefault
starttls_protocolsmtp, imap, pop3, ldap, ftp, xmpp, postgres, mysql, mongodb, redis, cassandra, kafka or amqpsmtp
portTCP portThe protocol default port (table above)
timeout_secondsPer-step timeout10
starttls_no_pq_probeSkip the post-quantum key-exchange probe. Opens far fewer connections per host, but the result has no post-quantum verdictfalse

With the scanner agent (CLI)​

# Mail submission servers
dke-scanner-agent starttls --target mail1.example.com,mail2.example.com --protocol smtp

# A PostgreSQL server on a non-default port, human-readable summary
dke-scanner-agent starttls --target db.internal.example.com --protocol postgres --port 6432 --format summary

# Kafka brokers, JSON written to a file
dke-scanner-agent starttls --target kafka1,kafka2,kafka3 --protocol kafka -o kafka-tls.json

See the CLI reference for every option.

From an AI assistant (MCP)​

The Cockpit MCP server exposes a scan_starttls tool with the same parameters (target, protocol, port, skip_pq_probe), up to 64 hosts per call. See MCP.

ヒント

Scanning many hosts? Combine this scan with a domain scan of your HTTPS endpoints: the key-exchange verdicts use the same probe, so the results line up in the same inventory and Quantum Risk Score.