]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-reply.rst
b6aec3c88f787819a4c66da89e1279aa29080a97
[notmuch] / doc / man1 / notmuch-reply.rst
1 =============
2 notmuch-reply
3 =============
4
5 SYNOPSIS
6 ========
7
8 **notmuch** **reply** [option ...] <*search-term*> ...
9
10 DESCRIPTION
11 ===========
12
13 Constructs a reply template for a set of messages.
14
15 To make replying to email easier, **notmuch reply** takes an existing
16 set of messages and constructs a suitable mail template. Its To:
17 address is set according to the original email in this way: if the
18 Reply-to: header is present and different from any To:/Cc: address it
19 is used, otherwise From: header is used. Unless
20 ``--reply-to=sender`` is specified, values from the To: and Cc: headers
21 are copied, but not including any of the current user's email addresses
22 (as configured in primary\_mail or other\_email in the .notmuch-config
23 file) in the recipient list.
24
25 It also builds a suitable new subject, including Re: at the front (if
26 not already present), and adding the message IDs of the messages being
27 replied to to the References list and setting the In-Reply-To: field
28 correctly.
29
30 Finally, the original contents of the emails are quoted by prefixing
31 each line with '> ' and included in the body.
32
33 The resulting message template is output to stdout.
34
35 Supported options for **reply** include
36
37     ``--format=``\ (**default**\ \|\ **json**\ \|\ **sexp**\ \|\ **headers-only**)
38
39         **default**
40             Includes subject and quoted message body as an RFC 2822
41             message.
42
43         **json**
44             Produces JSON output containing headers for a reply message
45             and the contents of the original message. This output can be
46             used by a client to create a reply message intelligently.
47
48         **sexp**
49             Produces S-Expression output containing headers for a reply
50             message and the contents of the original message. This
51             output can be used by a client to create a reply message
52             intelligently.
53
54         **headers-only**
55             Only produces In-Reply-To, References, To, Cc, and Bcc
56             headers.
57
58     ``--format-version=N``
59         Use the specified structured output format version. This is
60         intended for programs that invoke **notmuch(1)** internally. If
61         omitted, the latest supported version will be used.
62
63     ``--reply-to=``\ (**all**\ \|\ **sender**)
64
65         **all** (default)
66             Replies to all addresses.
67
68         **sender**
69             Replies only to the sender. If replying to user's own
70             message (Reply-to: or From: header is one of the user's
71             configured email addresses), try To:, Cc:, and Bcc: headers
72             in this order, and copy values from the first that contains
73             something other than only the user's addresses.
74
75     ``--decrypt``
76         Decrypt any MIME encrypted parts found in the selected content
77         (ie. "multipart/encrypted" parts). Status of the decryption will
78         be reported (currently only supported with --format=json and
79         --format=sexp) and on successful decryption the
80         multipart/encrypted part will be replaced by the decrypted
81         content.
82
83         Decryption expects a functioning **gpg-agent(1)** to provide any
84         needed credentials. Without one, the decryption will fail.
85
86 See **notmuch-search-terms(7)** for details of the supported syntax for
87 <search-terms>.
88
89 Note: It is most common to use **notmuch reply** with a search string
90 matching a single message, (such as id:<message-id>), but it can be
91 useful to reply to several messages at once. For example, when a series
92 of patches are sent in a single thread, replying to the entire thread
93 allows for the reply to comment on issues found in multiple patches. The
94 default format supports replying to multiple messages at once, but the
95 JSON and S-Expression formats do not.
96
97 EXIT STATUS
98 ===========
99
100 This command supports the following special exit status codes
101
102 ``20``
103     The requested format version is too old.
104
105 ``21``
106     The requested format version is too new.
107
108 SEE ALSO
109 ========
110
111 **notmuch(1)**,
112 **notmuch-config(1)**,
113 **notmuch-count(1)**,
114 **notmuch-dump(1)**,
115 **notmuch-hooks(5)**,
116 **notmuch-insert(1)**,
117 **notmuch-new(1)**,
118 **notmuch-restore(1)**,
119 **notmuch-search(1)**,
120 **notmuch-search-terms(7)**,
121 **notmuch-show(1)**,
122 **notmuch-tag(1)**