]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-address.rst
cli: add support for only printing the addresses in notmuch address
[notmuch] / doc / man1 / notmuch-address.rst
1 ===============
2 notmuch-address
3 ===============
4
5 SYNOPSIS
6 ========
7
8 **notmuch** **address** [*option* ...] <*search-term*> ...
9
10 DESCRIPTION
11 ===========
12
13 Search for messages matching the given search terms, and display the
14 addresses from them. Duplicate addresses are filtered out.
15
16 See **notmuch-search-terms(7)** for details of the supported syntax for
17 <search-terms>.
18
19 Supported options for **address** include
20
21     ``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
22         Presents the results in either JSON, S-Expressions, newline
23         character separated plain-text (default), or null character
24         separated plain-text (compatible with **xargs(1)** -0 option
25         where available).
26
27     ``--format-version=N``
28         Use the specified structured output format version. This is
29         intended for programs that invoke **notmuch(1)** internally. If
30         omitted, the latest supported version will be used.
31
32     ``--output=(sender|recipients|count|address)``
33
34         Controls which information appears in the output. This option
35         can be given multiple times to combine different outputs.
36         When neither --output=sender nor --output=recipients is
37         given, --output=sender is implied.
38
39         **sender**
40             Output all addresses from the *From* header.
41
42             Note: Searching for **sender** should be much faster than
43             searching for **recipients**, because sender addresses are
44             cached directly in the database whereas other addresses
45             need to be fetched from message files.
46
47         **recipients**
48             Output all addresses from the *To*, *Cc* and *Bcc*
49             headers.
50
51         **count**
52             Print the count of how many times was the address
53             encountered during search.
54
55             Note: With this option, addresses are printed only after
56             the whole search is finished. This may take long time.
57
58         **address**
59             Output only the email addresses instead of the full
60             mailboxes with names and email addresses. This option has
61             no effect on the JSON or S-Expression output formats.
62
63     ``--deduplicate=(no|mailbox|address)``
64
65         Control the deduplication of results.
66
67         **no**
68             Output all occurrences of addresses in the matching
69             messages. This is not applicable with --output=count.
70
71         **mailbox**
72             Deduplicate addresses based on the full, case sensitive
73             name and email address, or mailbox. This is effectively
74             the same as piping the --deduplicate=no output to **sort |
75             uniq**, except for the order of results. This is the
76             default.
77
78         **address**
79             Deduplicate addresses based on the case insensitive
80             address part of the mailbox. Of all the variants (with
81             different name or case), print the one occurring most
82             frequently among the matching messages. If --output=count
83             is specified, include all variants in the count.
84
85     ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
86         This option can be used to present results in either
87         chronological order (**oldest-first**) or reverse chronological
88         order (**newest-first**).
89
90         By default, results will be displayed in reverse chronological
91         order, (that is, the newest results will be displayed first).
92
93         However, if either --output=count or --deduplicate=address is
94         specified, this option is ignored and the order of the results
95         is unspecified.
96
97     ``--exclude=(true|false)``
98         A message is called "excluded" if it matches at least one tag in
99         search.tag\_exclude that does not appear explicitly in the
100         search terms. This option specifies whether to omit excluded
101         messages in the search process.
102
103         The default value, **true**, prevents excluded messages from
104         matching the search terms.
105
106         **false** allows excluded messages to match search terms and
107         appear in displayed results.
108
109 EXIT STATUS
110 ===========
111
112 This command supports the following special exit status codes
113
114 ``20``
115     The requested format version is too old.
116
117 ``21``
118     The requested format version is too new.
119
120 SEE ALSO
121 ========
122
123 **notmuch(1)**,
124 **notmuch-config(1)**,
125 **notmuch-count(1)**,
126 **notmuch-dump(1)**,
127 **notmuch-hooks(5)**,
128 **notmuch-insert(1)**,
129 **notmuch-new(1)**,
130 **notmuch-reply(1)**,
131 **notmuch-restore(1)**,
132 **notmuch-search-terms(7)**,
133 **notmuch-show(1)**,
134 **notmuch-tag(1)**,
135 **notmuch-search(1)**