summaryrefslogtreecommitdiff
path: root/email-extract-openpgp-certs.1.pod
blob: d1d641a30553f8fc933aa78d5cbf1a71a6c1e4d4 (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
=head1 NAME

email-extract-openpgp-certs - extract OpenPGP certificates from an e-mail

=head1 SYNOPSIS

B<email-extract-openpgp-certs> <B<message.eml> | B<gpg> B<--import>

=head1 DESCRIPTION

B<email-extract-openpgp-certs> extracts all the things it can find
that look like they might be OpenPGP certificates in an e-mail, and
produces them on standard output.

It currently knows about how to find OpenPGP certificates as
attachments of MIME type application/pgp-keys, and Autocrypt: style
headers.

=head1 OPTIONS

None.

=head1 EXAMPLE

=over 4

    $ notmuch show --format-raw id:b7e48905-842f@example.net >test.eml
    $ email-extract-openpgp-certs <test.eml | gpg --import

=back

=head1 LIMITATIONS

B<email-extract-openpgp-certs> currently does not try to decrypt
encrypted e-mails, so it cannot find certificates that are inside the
message's cryptographic envelope.

B<email-extract-openpgp-certs> does not attempt to validate the
certificates it finds in any way.  It does not ensure that they are
valid OpenPGP certificates, or even that they are of a sane size. It
does not try to establish any relationship between the extracted
certificates and the messages in which they are sent.  For example, it
does not check the Autocrypt addr= attribute against the message's From:
header.

Importing certificates extracted from an arbitrary e-mail in this way
into a curated keyring is not a good idea.  Better to extract into an
ephemeral location, inspect, filter, and then selectively import.

=head1 SEE ALSO

gpg(1), https://autocrypt.org, https://tools.ietf.org/html/rfc4880, https://tools.ietf.org/html/rfc3156

=head1 AUTHOR

B<email-extract-openpgp-certs> and this manpage were written by Daniel
Kahn Gillmor, with guidance and advice from many others.