Provided by: mailscripts_30-1_all
NAME
email-print-mime-structure - display a tree-like view of the MIME structure of an e-mail
SYNOPSIS
email-print-mime-structure <message.eml
DESCRIPTION
email-print-mime-structure reads a MIME message from stdin and produces a treelike representation to stdout. If the user wants the parts numbered, they can feed the output through something like "cat -n".
OPTIONS
--pgpkey=KEYFILE KEYFILE should name an OpenPGP transferable secret key that is not password-protected. If a PGP/MIME-encrypted message is found on standard input, this key will be tried for decryption. May be used multiple times if you want to try decrypting with more than one secret key. OpenPGP secret keys listed in --pgpkey= are used ephemerally, and do not interact with any local GnuPG keyring. --cmskey=KEYFILE KEYFILE should name a PEM- or DER-encoded X.509 private key that is not password- protected. If an S/MIME-encrypted message that uses CMS is found on standard input, this key will be tried for decryption. May be used multiple times if you want to try decrypting with more than one such key. X.509 private keys listed in --cmskey= are used ephemerally, and do not interact with any local GnuPG keyring. --use-gpg-agent If this flag is present, and email-print-mime-structure encounters a PGP/MIME- or S/MIME-encrypted part, it will try to decrypt the part using the secret keys found in the local installation of GnuPG. If --use-gpg-agent is supplied along with either --pgpkey=KEYFILE or --cmskey=KEYFILE arguments, the KEYFILE arguments will be tried before falling back to GnuPG. If email-print-mime-structure has been asked to decrypt parts with either --pgpkey=KEYFILE or with --use-gpg-agent, and it is unable to decrypt an encrypted part, it will emit a warning to stderr. --no-use-gpg-agent Don't try to decrypt PGP/MIME- or S/MIME-encrypted parts using secret keys found in the local installation of GnuPG. This is the default. --help, -h Show usage instructions.
EXAMPLE
$ email-print-mime-structure <test.eml └┬╴multipart/signed 6546 bytes ├─╴text/plain inline 895 bytes └─╴application/pgp-signature inline [signature.asc] 836 bytes
LIMITATIONS
email-print-mime-structure's output is not stable, and is not intended to be interpreted by machines, so please do not depend on it in scripts! email-print-mime-structure displays some data from within the e-mail, but does not sanitize it before display. Some particularly cleverly-malformed MIME parameters might be able to induce apparent formatting changes or emit arbitrary characters to stdout. email-print-mime-structure expects to be run in a UTF-8-friendly environment.
SEE ALSO
https://tools.ietf.org/html/rfc2045, https://tools.ietf.org/html/rfc2049, https://tools.ietf.org/html/rfc3156
AUTHOR
email-print-mime-structure and this manpage were written by Daniel Kahn Gillmor and Jameson Graef Rollins, with suggestions and feedback from many others in the community that develops the notmuch mail user agent. It originated in the notmuch source tree.