GPG-MAIL-TUBE(1)
โจ NAME โจ
okay so welcome to GPG-MAIL-TUBE(1), bestie ๐ this one lives under the GNU Privacy Guard 2.4 umbrella and it's literally here to encrypt rfc822 formatted mail right in a pipeline. no big deal, just main character encryption energy ๐
๐ SYNOPSIS ๐
gpg-mail-tube [options] recipients
๐ DESCRIPTION ๐
gpg-mail-tube takes RFC-822 formatted mail on stdin and turns it into a PGP/MIME encrypted mail, which is then written to stdout. it's giving โmail goes in, encrypted mail comes outโ and honestly? iconic ๐ฆ
the recipients must be plain mail addresses, like foo@example.org, and should in general list the To and Cc addresses contained in the mail. yes bestie, keep the list matching the mail โ no chaotic guessing ๐
๐ธ OPTIONS ๐ธ
gpg-mail-tube understands these options:
--verbose,-vโ enable extra informational output. it's giving โtell me everythingโ energy โจ--quiet,-qโ try to be as quiet as possible. shhh ๐คซ--log-filefile โ write log output to file. usesocket://to log to a socket. fancy ๐--no-stderrโ suppresses all output to stderr. this is useful for callers which don't distinguish stdout and stderr. to get diagnostics, the option--log-filecan be used ๐ซถ--headername=value โ add the mail header"name: value"to the output. cute little header moment ๐--setenvname=value โ put the given environment string into the environment of this process and of the calledgpg. this option is required if there is no other way to set the environment ๐ฅ--as-attach,-aโ do not write a PGP/MIME mail, but emit a simple body along with an attachment containing the encrypted body of the input mail. if the input was a plain text message, a simple encrypted file will be attached. if the input was a multipart MIME message, the encrypted file is of typemessage/rfc822. different vibe, same encryption ๐--gpggpgcmd โ use the specified command gpgcmd instead ofgpg. you can point it at your fave ๐--vsdโ use thegpgfrom a GnuPG VS-Desktopยฎ AppImage. the AppImage is started if it is not running. a symlink named~/.gnupg-vsd/gnupg-vs-desktop.AppImageneeds to link to the actually to be used AppImage ๐ง--versionโ print version of the program and exit. tiny flex โญ--helpโ display a brief help page and exit. we love a quick orientation ๐
๐ฆ EXAMPLES ๐ฆ
the following options can be used in a local transport rule of the Exim MTA which assumes that check_local_user has been used in the router.
transport_filter = /usr/local/bin/gpg-mail-tube --setenv HOME=${home} \
--no-stderr -- $pipe_addresses
for a remote transport, the use of size_addition and an explicit setting of the user and its home directory might be required. lowkey important, so don't skip it ๐
๐ซถ DIAGNOSTICS ๐ซถ
the program returns 0 on a successful encryption or a non-zero value on error. note that on error some output might have already been written to stdout. yeah bestie, that's the little plot twist ๐ญ
๐ฅ SEE ALSO ๐ฅ
the full documentation for this tool is maintained as a Texinfo manual. if GnuPG and the info program are properly installed at your site, the command
info gnupg
should give you access to the complete manual including a menu structure and an index. slay ๐
this page was brought to you by GnuPG 2.4.9 on 2025-02-19 โ periodt ๐
๐ฆ where this page comes from
- alpine 3.22: gnupg-doc 2.4.9-r0 ยท GPL-3.0-or-later
- alpine 3.23: gnupg-doc 2.4.9-r0 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms