POSTTLS-FINGER(1)
π posttls-finger(1) β General Commands Manual π
β¨ NAME β¨
posttls-finger β she probes the TLS properties of an ESMTP or LMTP server, periodt. π
π SYNOPSIS π
posttls-finger [options] [inet:]domain[:port] [match ...]
posttls-finger -S [options] unix:pathname [match ...]
π DESCRIPTION π
okay so posttls-finger(1) connects to the destination you picked and reports TLS-related information about that server. With SMTP, the destination is a domainname; with LMTP it's either a domainname prefixed with inet: or a pathname prefixed with unix:. If Postfix is built without TLS support, the resulting posttls-finger(1) program has very limited functionality, and only the -a, -c, -h, -o, -S, -t, -T and -v options are available. π«Ά
Note: this is an unsupported test program. No attempt is made to maintain compatibility between successive versions. So like, don't build your whole personality on it, bestie. π
For SMTP servers that don't support ESMTP, only the greeting banner and the negative EHLO response are reported. Otherwise, the reported EHLO response details further server capabilities. β¨
If TLS support is enabled when posttls-finger(1) is compiled, and the server supports STARTTLS, a TLS handshake is attempted. π₯
If DNSSEC support is available, the connection TLS security level (-l option) defaults to dane; see TLS_README for details. Otherwise, it defaults to secure. This setting determines the certificate matching policy. π
If TLS negotiation succeeds, the TLS protocol and cipher details are reported. The server certificate is then verified in accordance with the policy at the chosen (or default) security level. With public CA-based trust, when the -L option includes certmatch, (true by default) name matching is performed even if the certificate chain is not trusted. This logs the names found in the remote SMTP server certificate and which if any would match, were the certificate chain trusted. π¦
Note:posttls-finger(1)does not perform any table lookups, so the TLS policy table and obsolete per-site tables are not consulted. It does not communicate with thetlsmgr(8)daemon (or any other Postfix daemons); its TLS session cache is held in private memory, and disappears when the process exits. it's giving independent main character energy, no cap. π
With the -r delay option, if the server assigns a TLS session id, the TLS session is cached. The connection is then closed and re-opened after the specified delay, and posttls-finger(1) then reports whether the cached TLS session was re-used. π
When the destination is a load balancer, it may be distributing load between multiple server caches. Typically, each server returns its unique name in its EHLO response. If, upon reconnecting with -r, a new server name is detected, another session is cached for the new server, and the reconnect is repeated up to a maximum number of times (default 5) that can be specified via the -m option. π
The choice of SMTP or LMTP (-S option) determines the syntax of the destination argument. With SMTP, one can specify a service on a non-default port as host:service, and disable MX (mail exchanger) DNS lookups with [host] or [host]:port. The [] form is required when you specify an IP address instead of a hostname. An IPv6 address takes the form [ipv6:address]. The default port for SMTP is taken from the smtp/tcp entry in /etc/services, defaulting to 25 if the entry is not found. π
With LMTP, specify unix:pathname to connect to a local server listening on a unix-domain socket bound to the specified pathname; otherwise, specify an optional inet: prefix followed by a domain and an optional port, with the same syntax as for SMTP. The default TCP port for LMTP is 24. π
π Arguments π
-afamily (default:any) β Address family preference:ipv4,ipv6orany. When usingany,posttls-finger(1)will randomly select one of the two as the more preferred, and exhaust all MX preferences for the first address family before trying any addresses for the other. π-Atrust-anchor.pem (default:none) β A list of PEM trust-anchor files that overridesCAfileandCApathtrust chain verification. Specify the option multiple times to specify multiple files. See themain.cfdocumentation forsmtp_tls_trust_anchor_filefor details. π«Ά-cβ Disable SMTP chat logging; only TLS-related information is logged. π€«-Cβ Print the remote SMTP server certificate trust chain in PEM format. The issuer DN, subject DN, certificate and public key fingerprints (see-d mdalgoption below) are printed above each PEM certificate block. If you specify-F CAfileor-P CApath, the OpenSSL library may augment the chain with missing issuer certificates. To see the actual chain sent by the remote SMTP server leaveCAfileandCApathunset. π-dmdalg (default:$smtp_tls_fingerprint_digest) β The message digest algorithm to use for reporting remote SMTP server fingerprints and matching against user provided certificate fingerprints (with DANE TLSA records the algorithm is specified in the DNS). In Postfix versions prior to 3.6, the default value was"md5". π-fβ Look up the associated DANE TLSA RRset even when a hostname is not an alias and its address records lie in an unsigned zone. Seesmtp_tls_force_insecure_host_tlsa_lookupfor details. π΅οΈ-FCAfile.pem (default:none) β The PEM formattedCAfilefor remote SMTP server certificate verification. By default noCAfileis used and no public CAs are trusted. π-ggrade (default:medium) β The minimum TLS cipher grade used byposttls-finger(1). Seesmtp_tls_mandatory_ciphersfor details. πͺ-hhost_lookup (default:dns) β The hostname lookup methods used for the connection. See the documentation ofsmtp_host_lookupfor syntax and semantics. π-Hchainfiles (default:none) β List of files with a sequence PEM-encoded TLS client certificate chains. The list can be built-up incrementally, by specifying the option multiple times, or all at once via a comma or whitespace separated list of filenames. Each chain starts with a private key, which is followed immediately by the corresponding certificate, and optionally by additional issuer certificates. Each new key begins a new chain for the corresponding algorithm. This option is mutually exclusive with the below-kand-Koptions. π§-kcertfile (default:keyfile) β File with PEM-encoded TLS client certificate chain. This defaults tokeyfileif one is specified. π-Kkeyfile (default:certfile) β File with PEM-encoded TLS client private key. This defaults tocertfileif one is specified. π-llevel (default:daneorsecure) β The security level for the connection, defaultdaneorsecuredepending on whether DNSSEC is available. For syntax and semantics, see the documentation ofsmtp_tls_security_level. Whendaneordane-onlyis supported and selected, if no TLSA records are found, or all the records found are unusable, thesecurelevel will be used instead. The fingerprint security level allows you to test certificate or public-key fingerprint matches before you deploy them in the policy table.
Note, since posttls-finger(1) does not actually deliver any email, the none, may and encrypt security levels are not very useful. Since may and encrypt don't require peer certificates, they will often negotiate anonymous TLS ciphersuites, so you won't learn much about the remote SMTP server's certificates at these levels if it also supports anonymous TLS (though you may learn that the server supports anonymous TLS). π
-Llogopts (default:routine,certmatch) β Fine-grained TLS logging options. To tune the TLS features logged during the TLS handshake, specify one or more of:0,noneβ These yield no TLS logging; you'll generally want more, but this is handy if you just want the trust chain:$ posttls-finger -cC -L none destinationπ1,routine,summaryβ These synonymous values yield a normal one-line summary of the TLS connection. β¨2,debugβ These synonymous values combineroutine,ssl-debug,cacheandverbose. π3,ssl-expertβ These synonymous values combinedebugwithssl-handshake-packet-dump. For experts only. π§4,ssl-developerβ These synonymous values combinessl-expertwithssl-session-packet-dump. For experts only, and in most cases, use wireshark instead. π§ͺssl-debugβ Turn on OpenSSL logging of the progress of the SSL handshake. This includes detailed output of decoded handshake messages. πssl-handshake-packet-dumpβ Log hexadecimal packet dumps of the SSL handshake; for experts only. π’ssl-session-packet-dumpβ Log hexadecimal packet dumps of the entire SSL session; only useful to those who can debug SSL protocol problems from hex dumps. π§¬untrustedβ Logs trust chain verification problems. This is turned on automatically at security levels that use peer names signed by Certification Authorities to validate certificates. So while this setting is recognized, you should never need to set it explicitly. π©peercertβ This logs a one line summary of the remote SMTP server certificate subject, issuer, and fingerprints. πͺͺcertmatchβ This logs remote SMTP server certificate matching, showing the CN and each subjectAltName and which name matched. With DANE, logs matching of TLSA record trust-anchor and end-entity certificates. βcacheβ This logs session cache operations, showing whether session caching is effective with the remote SMTP server. Automatically used when reconnecting with the-roption; rarely needs to be set explicitly. ποΈverboseβ Enables verbose logging in the Postfix TLS driver; includes all ofpeercert..cacheand more. π’
The default is routine,certmatch. After a reconnect, peercert, certmatch and verbose are automatically disabled while cache and summary are enabled. π
-mcount (default: 5) β when you're reconnecting with the-rdelay option, this sets the max number of reconnect attempts to a server behind a load balancer, just to see if connection caching is gonna be effective for this destination. Some MTAs don't spill the tea about their underlying server identity in EHLO, so with those you'll never get more than 1 reconnection attempt. π-Minsecure_mx_policy (default:dane) β the TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level isdane, but the MX record was found via an "insecure" MX lookup. Peep themain.cfdocs forsmtp_tls_dane_insecure_mx_policyfor the deets. π-oname=value β drop this zero or more times to override themain.cfparameter name with value. Use-cases? Overriding TLS library parameters, or"myhostname"to set the SMTP EHLO name sent to the remote server. iconic. π-pprotocols (default:>=TLSv1) β TLS protocols thatposttls-finger(1)will exclude or include. Seesmtp_tls_mandatory_protocolsfor details. β¨-PCApath/ (default: none) β the OpenSSLCApath/directory (indexed viac_rehash(1)) for remote SMTP server certificate verification. By default no CApath is used and no public CAs are trusted. periodt. π-rdelay β with a cacheable TLS session, disconnect and reconnect after delay seconds. Report whether the session is re-used. Retry if a new server is encountered, up to 5 times or as specified with the-moption. By default reconnection is disabled, so specify a positive delay to enable this behavior. π-Rβ use SRV lookup instead of MX. simple as that. π-sservername β the server name to send with the TLS Server Name Indication (SNI) extension. When the server has DANE TLSA records, this parameter is ignored and the TLSA base domain is used instead. Otherwise, SNI is not used by default, but you can enable it by specifying the desired value with this option. π¦-Sβ disable SMTP; that is, connect to an LMTP server. The default port for LMTP over TCP is24. Alternative ports can be specified by appending":servicename"or":portnumber"to the destination argument. π-ttimeout (default: 30) β the TCP connection timeout to use. This is also the timeout for reading the remote server's220banner. β³-Ttimeout (default: 30) β the SMTP/LMTP command timeout for EHLO/LHLO, STARTTLS and QUIT. β°-vβ enable verbose Postfix logging. Specify more than once to increase the level of verbose logging. π£οΈ-wβ enable outgoing TLS wrapper mode, or SUBMISSIONS/SMTPS support. This is typically provided on port465by servers that are compatible with the SMTP-in-SSL protocol, rather than the STARTTLS protocol. The destination domain:port must of course provide such a service. π-xβ prefer RFC7250 non-X.509 raw public key (RPK) server credentials. By default only X.509 certificates are accepted. This is analogous to settingsmtp_tls_enable_rpk = yesin thesmtp(8)client. At the fingerprint security level, when raw public keys are enabled, only public key (and not certificate) fingerprints will be compared against the specified list of match arguments. Certificate fingerprints are fragile when raw public keys are solicited, the server may at some point in time start returning only the public key. π-Xβ enabletlsproxy(8)mode. This is an unsupported mode, for program development only. β οΈ (so don't come for me if it breaks)[inet:]domain[:port]β connect via TCP to domain domain, port port. The default port issmtp(or24with LMTP). With SMTP an MX lookup is performed to resolve the domain to a host, unless the domain is enclosed in[]. If you want to connect to a specific MX host, for instancemx1.example.com, specify[mx1.example.com]as the destination andexample.comas a match argument. When using DNS, the destination domain is assumed fully qualified and no default domain or search suffixes are applied; you must use fully-qualified names or also enable native host lookups (these don't supportdaneordane-onlyas no DNSSEC validation information is available via native lookups). πunix:pathnameβ connect to the UNIX-domain socket at pathname. LMTP only. π§match ...β with no match arguments specified, certificate peername matching uses the compiled-in default strategies for each security level. If you specify one or more arguments, these will be used as the list of certificate or public-key digests to match for the fingerprint level, or as the list of DNS names to match in the certificate at the verify and secure levels. If the security level isdane, ordane-onlythe match names are ignored, and hostname, nexthop strategies are used. π―
πΏ ENVIRONMENT πΏ
MAIL_CONFIGβ read configuration parameters from a non-default location. πMAIL_VERBOSEβ same as-voption. π£οΈ
π SEE ALSO π
smtp-source(1), SMTP/LMTP message sourcesmtp-sink(1), SMTP/LMTP message dump
π README FILES π
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
TLS_README, Postfix STARTTLS howto
π LICENSE π
The Secure Mailer license must be distributed with this software.
π AUTHOR(S) π
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
Viktor Dukhovni
And that's the whole vibe, bestie! The footer was giving POSTTLS-FINGER(1), and honestly? same. π
β¨ Keep slaying those TLS handshakes. π«Άπ
π¦ where this page comes from
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms