MHSIGN(1)
π
MHSIGN(1) β the mmh girlie's guide to signing & encrypting π
okay so real talk: this is mhsign from the mmh-0.4 manual set, and she is literally the bouncer at the club door of your email. let's get into it π«Ά
β¨ NAME β¨
mhsign β sign or encrypt a message with gnupg π
πΈ SYNOPSIS πΈ
mhsign [-encrypt] [-mime] [-Version] [-help] file
π¦ DESCRIPTION π¦
so mhsign is a script whose whole entire job is to make signing and encrypting not a whole thing, using gnupg. that's it. that's the vibe. π
most of the time you won't even call it yourself β mhsign is normally invoked automatically by send. main character energy, but behind the scenes. π¬
when you do use it directly, the source file β typically an MH draft file β gets replaced by the signed or encrypted message. yes, replaced. gone. the original file is not staying. π but bestie don't panic, because to permit recovery from mistakes, a backup copy of the original file is saved, under the same name with .orig appended. so your draft is chilling at something.orig and it's fine. π
here are the options she recognizes:
-encryptβ encrypt to recipients, in addition to signing. the message will also be encrypted to the signing key. so like, you sign it, and you encrypt it, and it also gets encrypted to your own key. self-love, we stan. π-mimeβ use the PGP/MIME standard for signing and encrypting. this is automatic if the message is already a multipart MIME message. otherwise the default is to sign/encrypt in the old-fashioned non-MIME manner, for compatibility with older software. and here's the cute lil caveat: when a message is signed but not encrypted, using the PGP/MIME formatting, any line beginning withFromwill be indented, and any trailing spaces will be removed from lines in the message body. this is to ensure maximum compatibility. so where trailing blanks are important (sending patches, for example), it would be wise to use quoted-printable or other MIME encoding for that component. π₯ important!! don't let your patches get space-murdered.
okay now the key situation π
the signing key is automatically determinded by gnupg (yes, "determinded", that's how the manual spells it, we're keeping it, character for character bestie π), unless the the profile entry Pgpkey defines it. (double "the" also shipped as-is, i don't make the rules.) the environment variable MMHPGPKEY has highest precedence and can be used to overrule the key uid temporarily. π
for encryption, the public keys of the recipients are taken from the gnupg keyring. to handle exceptions β like, say, recipient addresses that don't match the key uid in the keyring β a file named pgpkeys may be used. she should be located either in the gnupg directory (normally $HOME/.gnupg) or in the mmh directory (normally $HOME/.mmh). and if both files exist, the one in the gnupg directory takes precedence. gnupg wins the sibling rivalry, sorry to the mmh one. π
a sample pgpkeys file, for the visual learners:
0x88888888 john@nowhere.example.org
e5fda812 meillo@marmaro.de
π FILES π
$HOME/.gnupg/pgpkeysβ pubkey exceptions for encrypting$HOME/.mmh/pgpkeysβ ... alternative location
π PROFILE COMPONENTS π
Pgpkey:β to determine the user's signing key
π SEE ALSO π
whom(1), send(1), mhpgp(1), gpg(1), hostname(1) β go read your friends, they're all slaying β¨
π DEFAULTS π
none. as in, nothing. the void. empty. she's a blank canvas bestie. π¨
π§ CONTEXT π§
none either. living her life with no context whatsoever. honestly relatable. π
π BUGS π
okay so two things, and they're real:
- the order of the command line arguments is relevant: options must come first, the file must be last. so like
mhsign -encrypt -mime draftβ options, then file. don't get cute with it. π¨ - this script uses
hostnameto get the hostname if it isn't in the address, thoughhostnameisn't specified by POSIX. so, y'know. lowkey non-standard, highkey works anyway.
that's the whole page bestie, no skipped bits, no cap. every flag, every path, every caveat, all of it. π
and that's a wrap! π¦ this was MH.6.8, dated 2019-01-06, mwah, kisses, go sign something iconic β¨π
π
π¦ where this page comes from
- alpine 3.24: mmh-doc 0.4-r3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms