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-file file โ€” write log output to file. use socket:// 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-file can be used ๐Ÿซถ
  • --header name=value โ€” add the mail header "name: value" to the output. cute little header moment ๐ŸŽ€
  • --setenv name=value โ€” put the given environment string into the environment of this process and of the called gpg. 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 type message/rfc822. different vibe, same encryption ๐Ÿ’–
  • --gpg gpgcmd โ€” use the specified command gpgcmd instead of gpg. you can point it at your fave ๐Ÿ‘‘
  • --vsd โ€” use the gpg from a GnuPG VS-Desktopยฎ AppImage. the AppImage is started if it is not running. a symlink named ~/.gnupg-vsd/gnupg-vs-desktop.AppImage needs 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