COURIERTLS(1)
πΈ COURIERTLS(1) β the couriertls glow-up β¨
okay bestie, we're in section 1 of the manual, the command-line one, and this page is your girl couriertls. it's the Courier mail server's TLS/SSL protocol wrapper, and ngl it's lowkey the bouncer at the club that handles all the scary handshake stuff so your app doesn't have to. let's get into it π
π NAME π
couriertls β the Courier mail server TLS/SSL protocol wrapper. that's her. that's the whole vibe. π
β¨ SYNOPSIS β¨
couriertls [option...] {program} {arg...}
π¦ DESCRIPTION π¦
so here's the tea: couriertls exists so that applications can encrypt a network connection using SSL/TLS without having to deal with the gory details of SSL/TLS themselves. it's giving "I got you, babe." π€
couriertls is used by the Courier mail server IMAP, POP3 and ESMTP servers. iconic behavior, truly.
and like, couriertls is not usually run directly from the commandline. an application typically creates a network connection first, then runs couriertls with the appropriate options to encrypt that network connection with SSL/TLS. it's the supportive bestie who shows up after the connection is already made π«Ά
π OPTIONS π
-host=host,-port=portβ these two are used instead of-remotefd, mostly for debugging purposes.couriertlsconnects to the specified server and immediately starts SSL/TLS negotation when the connection is established. (yes, the typo is canon, we keep her exactly as she is π)-localfd=nβ read and write data to encrypt via SSL/TLS from file descriptorn.-statusfd=nβ write SSL negotiation status to file descriptorn, then close this file descriptor. If SSL starts succesfully, reading onngets an immediate EOF. Otherwise, a single line of text β the error message β is read; the file descriptor is closed; andcouriertlsterminates. π so basically it's the "did it work or not" hotline.-printx509=nβ print the x509 certificate on file descriptornthen close it. The x509 certificate is printed before SSL/TLS encryption starts. The application may immediately read the certificate after runningcouriertls, until the file descriptor is closed. π-remotefd=nβ file descriptornis the network connection where SSL/TLS encryption is to be used.-serverβ negotiate server side of the SSL/TLS connection. If this option is not used the client side of the SSL/TLS connection is negotiated.-tcpdβcouriertlsis being called fromcouriertcpd, and the remote socket is present on descriptors0and1.-tcpdmeans, basically, the same as-remotefd=0, butcouriertlscloses file descriptor1, and redirects file descriptor1to file descriptor2. two-for-one deal, kind of β¨-user=usernameβ used whencouriertlsneeds to get started as root and fork off a root child process (see below), before dropping root and running as the specified user.-verify=domainβ verify that domain is set in theCNfield of the trusted X.509 certificate presented by the SSL/TLS peer.TLS_TRUSTCERTSmust be initialized (see below), and the certificate must be signed by one of the trusted certificates. TheCNfield can contain a wildcard:CN=*.examplewill match-verify=foo.example.com. For SSL/TLS clients,TLS_VERIFYPEERmust be set toPEER(see below). π-protocol=protoβ send proto protocol commands before enabling SSL/TLS on the remote connection. proto is either"smtp"or"imap". This is a debugging option that can be used to troubleshoot SSL/TLS with a remote IMAP or SMTP server. π οΈ
fr fr, listen up about this next part: if the -remotefd=n option is not specified, the rest of the command line specifies the program to run β and its arguments β whose standard input and output is encrypted via SSL/TLS over the network connection. This is done before the -user option drops root and couriertls continues to run as the indicated user. If the program is not specified, the standard input and output of couriertls itself is encrypted. main character energy honestly π
π ENVIRONMENT VARIABLES π
couriertls reads the following environment variables in order to configure the SSL/TLS protocol:
TLS_PROTOCOL=protoβ set the protocol version. This is used whencouriertlsis compiled with OpenSSL. This is ignored whencouriertlsis compiled with GnuTLS. The possible options are:TLS1orTLSv1β the default setting selects TLS protocol version 1 or higher.TLSv1.1orTLSv1.1+β the default setting selects TLS protocol version 1.1 or higher, the connection fails if the TLS peer does not implement at least version 1.1.TLSv1.2orTLSv1.2+β the default setting selects TLS protocol version 1.2 or higher, the connection fails if the TLS peer does not implement at least version 1.2TLSv1.1++orTLSv1.2++β the additional β+β disables protocol renegotiation, and selects server cipher preference (TLSv1.2++only, usesTLS_CIPHER_LIST).
TLS_CIPHER_LIST=cipherlistβ sets the list of protocol ciphers to be used. See OpenSSL's documentation for more information. πTLS_TIMEOUT=secondsβ currently not implemented, and reserved for future use. This is supposed to be an inactivity timeout, but it's not yet implemented. π so bestie, it's a placeholder. we wait.TLS_DHCERTFILE=filenameβ PEM file that stores our Diffie-Hellman cipher pair. When OpenSSL is compiled to use Diffie-Hellman ciphers instead of RSA you must generate a DH pair that will be used. In most situations the DH pair is to be treated as confidential, and filename must not be world-readable. πTLS_CERTFILE=filenameβ the certificate to use.TLS_CERTFILEis required for SSL/TLS servers, and is optional for SSL/TLS clients. filename must not be world-readable. πTLS_PRIVATE_KEYFILE=filenameβ SSL/TLS private key for decrypting client data.TLS_PRIVATE_KEYis optional becauseTLS_CERTFILEis generated including cert and private key both. filename must not be world-readable, and must be accessible without a pass-phrase, i.e. it must not be encrypted. β οΈ no password protection allowed here, that's the rule.TLS_TRUSTCERTS=pathnameβ load trusted root certificates from pathname. pathname can be a file or a directory. If a file, the file should contain a list of trusted certificates, in PEM format. If a directory, the directory should contain the trusted certificates, in PEM format, one per file and hashed using OpenSSL'sc_rehashscript.TLS_TRUSTCERTSis used by SSL/TLS clients (by specifying the-domainoption) and by SSL/TLS servers (TLS_VERIFYPEERis set toPEERorREQUIREPEER). π³TLS_VERIFYPEER=levelβ whether to verify peer's X.509 certificate. The exact meaning of this option depends upon whethercouriertlsis used in the client or server mode. In server mode:NONEβ do not request an X.509 certificate from the client;PEERβ request an optional X.509 certificate from the client, if the client returns one, the SSL/TLS connection is shut down unless the certificate is signed by a trusted certificate authority (seeTLS_TRUSTCERTS);REQUIREPEERβ same asPEER, except that the SSL/TLS connects is also shut down if the client does not return the optional X.509 certificate. In client mode:NONEβ ignore the server's X.509 certificate;PEERβ verify the server's X.509 certificate according to the-domainoption, (see above). π΅οΈ like a vibe check but for certs.TLS_CACHEFILE=filenameβ filename is the name of the file where TLS sessions are saved. The filename gets created if it does not exist.TLS_CACHEFILEs are optional, and result in slight performance improvements with session-aware TLS clients. πΎTLS_CACHESIZE=nβ n is the size of theTLS_CACHEFILEin bytes. Larger cache files allow more SSL/TLS sessions to be saved, and SSL/TLS sessions are saved. The filename gets created if it does not exist. The minimumTLS_CACHESIZEis16384. π do not go below that number, bestie.
π SEE ALSO π
couriertcpd(1)[1]courier(8)[2]
πΈ AUTHOR πΈ
Sam Varshavchik β Author π
β NOTES β
couriertcpd(1)β http://www.courier-mta.org/couriertcpd.htmlcourier(8)β http://www.courier-mta.org/courier.html
and that's the whole page, periodt π
this was Courier Mail Server, dated 01/10/2026 β go forth and encrypt responsibly, bestie πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: courier-base 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
- Copyright 2000-2018 S. Varshavchik. See COPYING for -->
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms