]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-reply.rst
Import notmuch_0.27.orig.tar.gz
[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     **default**
39         Includes subject and quoted message body as an RFC 2822
40         message.
41
42     **json**
43         Produces JSON output containing headers for a reply message
44         and the contents of the original message. This output can be
45         used by a client to create a reply message intelligently.
46
47     **sexp**
48         Produces S-Expression output containing headers for a reply
49         message and the contents of the original message. This output
50         can be used by a client to create a reply message
51         intelligently.
52
53     **headers-only**
54         Only produces In-Reply-To, References, To, Cc, and Bcc
55         headers.
56
57 ``--format-version=N``
58     Use the specified structured output format version. This is
59     intended for programs that invoke **notmuch(1)** internally. If
60     omitted, the latest supported version will be used.
61
62 ``--reply-to=``\ (**all**\ \|\ **sender**)
63     **all** (default)
64         Replies to all addresses.
65
66     **sender**
67         Replies only to the sender. If replying to user's own message
68         (Reply-to: or From: header is one of the user's configured
69         email addresses), try To:, Cc:, and Bcc: headers in this
70         order, and copy values from the first that contains something
71         other than only the user's addresses.
72
73 ``--decrypt=(false|auto|true)``
74
75     If ``true``, decrypt any MIME encrypted parts found in the
76     selected content (i.e., "multipart/encrypted" parts). Status
77     of the decryption will be reported (currently only supported
78     with --format=json and --format=sexp), and on successful
79     decryption the multipart/encrypted part will be replaced by
80     the decrypted content.
81
82     If ``auto``, and a session key is already known for the
83     message, then it will be decrypted, but notmuch will not try
84     to access the user's secret keys.
85
86     Use ``false`` to avoid even automatic decryption.
87
88     Non-automatic decryption expects a functioning
89     **gpg-agent(1)** to provide any needed credentials. Without
90     one, the decryption will likely fail.
91
92     Default: ``auto``
93
94 See **notmuch-search-terms(7)** for details of the supported syntax for
95 <search-terms>.
96
97 Note: It is most common to use **notmuch reply** with a search string
98 matching a single message, (such as id:<message-id>), but it can be
99 useful to reply to several messages at once. For example, when a series
100 of patches are sent in a single thread, replying to the entire thread
101 allows for the reply to comment on issues found in multiple patches. The
102 default format supports replying to multiple messages at once, but the
103 JSON and S-Expression formats do not.
104
105 EXIT STATUS
106 ===========
107
108 This command supports the following special exit status codes
109
110 ``20``
111     The requested format version is too old.
112
113 ``21``
114     The requested format version is too new.
115
116 SEE ALSO
117 ========
118
119 **notmuch(1)**,
120 **notmuch-config(1)**,
121 **notmuch-count(1)**,
122 **notmuch-dump(1)**,
123 **notmuch-hooks(5)**,
124 **notmuch-insert(1)**,
125 **notmuch-new(1)**,
126 **notmuch-restore(1)**,
127 **notmuch-search(1)**,
128 **notmuch-search-terms(7)**,
129 **notmuch-show(1)**,
130 **notmuch-tag(1)**