MHPARAM(1)
β¨ NAME β¨
okay bestie, meet mhparam β the nmh glow-up tool that prints out your nmh profile and context components π
she reads your config and tells you what's in it, no cap.
π SYNOPSIS π
mhparam [-help] [-version] [components] [-all] [-component |
-nocomponent] [-debug]
π¦ DESCRIPTION π¦
so basically, mhparam writes the value of the profile component(s) you asked for to standard output, each one separated by newlines. Component name matching is case-insensitive β she does not care about your capitalisation era, fr fr. And if the profile component is not present? She prints the default value instead β or literally nothing, if there's no default. (iconic behaviour tbh)
If you pass the -component switch, then the component name gets displayed right alongside the profile component's value. You can turn that off again with -nocomponent. π«Ά
Here's the little rule that trips people up, so pay attention bestie:
- if more than one component is specified in the
componentslist, then-componentis on by default. - if only one component is specified, then
-nocomponentis on by default.
If -all is specified, then all components in the nmh profile get displayed, and the other arguments are ignored. Periodt. π₯
She can also hand over other info, and it's giving β¨ bonus content β¨: the nmh version identifier, the locations of the nmh bindir, libexecdir, etcdir, and docdir install directories, all proc settings, and the datalocking method described in mh-profile(5). Info about the configuration of the nmh installation is up for grabs too, including the default mail spool locking method.
Wanna know whether your configuration includes support for SASL, TLS, iconv(3), and oauth? Run these, respectively β a non-null string means the support is there:
mhparam sasl
mhparam tls
mhparam iconv
mhparam oauth
Conversely, no output means that support is not included. Not a single crumb. π And the -debug switch displays all such other information available from mhparam. She's an open book, lowkey.
Examples, because we love receipts:
$ mhparam path
Mail
$ mhparam mhlproc
/usr/libexec/nmh/mhl
$ mhparam -component Path
Path: Mail
$ mhparam AliasFile rmmproc
AliasFile: aliases
rmmproc: rmmproc
$ mhparam -nocomponent AliasFile rmmproc
aliases
rmmproc
$ mhparam path nonexistent context
Path: Mail
context: context
$ mhparam version
nmh-1.8
$ mhparam etcdir
/etc/nmh
$ mhparam libexecdir
/usr/libexec/nmh
$ mhparam spoollocking
fcntl
$ mhparam datalocking
fcntl
$ mhparam sasl
cyrus_sasl
$ mhparam tls
tls
$ mhparam iconv
iconv
$ mhparam oauth
oauth
Also? She's the moment inside backquoted operations:
$ fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
π EXIT STATUS π
The exit status is zero if all components are found, or one if any are missing. So if you script against her, check that number, bestie. π
π FILES π
$HOME/.mh_profileβ the user profile- or
$MHβ rather than the standard profile <mh-dir>/contextβ the user context- or
$MHCONTEXTβ rather than the standard context
πΈ PROFILE COMPONENTS πΈ
context:β to determine the context file
π SEE ALSO π
π DEFAULTS π
-nocomponentif only one component is specified-componentif more than one component is specifiedcomponentsdefaults to none
π§ CONTEXT π§
None
and that's the whole vibe check, bestie β this page is from nmh-1.8, dated 2017-02-18, so go forth and mhparam responsibly πβ¨π
π¦ where this page comes from
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms