summaryrefslogtreecommitdiff
path: root/email-print-mime-structure.1.pod
blob: f1099978baef35c0dbd0accf35bff97a8f3c72d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
=encoding utf8

=head1 NAME

email-print-mime-structure - display a tree-like view of the MIME structure of an e-mail

=head1 SYNOPSIS

B<email-print-mime-structure> <B<message.eml>

=head1 DESCRIPTION

B<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".


=head1 OPTIONS

=over 4

=item B<--pgpkey=>I<KEYFILE>

I<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 B<--pgpkey=> are used ephemerally, and
do not interact with any local GnuPG keyring.

=item B<--use-gpg-agent>

If this flag is present, and B<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 both B<--pgpkey=>I<KEYFILE> and B<--use-gpg-agent> are
supplied, I<KEYFILE> arguments will be tried before falling back to
GnuPG.

If B<email-print-mime-structure> has been asked to decrypt parts with
either B<--pgpkey=>I<KEYFILE> or with B<--use-gpg-agent>, and it
is unable to decrypt an encrypted part, it will emit a warning to
stderr.

=item B<--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.

=item B<--help>, B<-h>

Show usage instructions.

=back


=head1 EXAMPLE

=over 4

    $ email-print-mime-structure <test.eml
    └┬╴multipart/signed 6546 bytes
     ├─╴text/plain inline 895 bytes
     └─╴application/pgp-signature inline [signature.asc] 836 bytes

=back

=head1 LIMITATIONS

B<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!

B<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.

B<email-print-mime-structure> expects to be run in a UTF-8-friendly
environment.

=head1 SEE ALSO

https://tools.ietf.org/html/rfc2045, https://tools.ietf.org/html/rfc2049,
https://tools.ietf.org/html/rfc3156

=head1 AUTHOR

B<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.