MKDHPARAMS(8)

πŸ’– MKDHPARAMS(8) πŸ’–

okay bestie, sit down, we're doing the mkdhparams page from section 8 of the manual, authored by S. Varshavchik, and it is lowkey iconic for how much it does with so little. no cap. 🫢

<div align="center">✨ πŸŽ€ ✨ πŸŽ€ ✨</div>

🌸 NAME 🌸

mkdhparams β€” create new DH parameters for the Courier Mail Server

it's giving "small script, big job" and honestly? obsessed. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

/usr/sbin/mkdhparams

that's it. that's the whole vibe. one path, zero args, no notes. 🌈


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this script is intended to be executed from a cron job, monthly. yes, monthly, like a lil self-care routine but for your crypto parameters. 😌

every time it runs, it peeks at the file /etc/courier/dhparams.pem, and if that file is older than 25 days, the script creates a new one. freshly baked. still warm. πŸ“

and what's in that new file? it contains pregenerated DH parameters for the Courier Mail Server. that's the whole point, bestie β€” you don't want to be generating these bad boys on the fly when a connection needs them, so this script pregenerates them ahead of time so they're just there, waiting. main character energy. πŸ‘‘

now, the DH_BITS environment variable β€” if it's set β€” controls the length of the generated DH parameters. and here's the important bit: it gets passed verbatim to either:

  • the dhparam OpenSSL command, or
  • the --sec-param option to GnuTLS's certtool

verbatim means verbatim, bestie β€” no vibes-checking, no reformatting, whatever you put in there goes straight through. πŸ™ˆ

and the defaults? absolutely crucial:

  • 768 for OpenSSL
  • "high" for GnuTLS

so like, if you don't set DH_BITS, that's what you're getting. periodt. πŸ’…

⚠️ heads up: that OpenSSL default of 768 is exactly the kind of number you should look at with your whole chest before just accepting it. the script will happily pass through whatever you give it, so know what you're asking for, okay? 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Sam Varshavchik

  • Author

a legend, honestly. writing mail server infra AND making it cron-friendly. we stan. 🌟


πŸ”₯ SEE ALSO πŸ”₯

there isn't a SEE ALSO section here bestie, so like… go read the Courier Mail Server docs, run the script, and hydrate. πŸ’§


and that's the whole page!! Courier Mail Server, 01/10/2026, MKDHPARAMS(8) β€” go forth, cron it up monthly, and let your DH parameters be pregenerated and unbothered. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from
  • ubuntu stonking: courier-base 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms