]> rtime.felk.cvut.cz Git - notmuch.git/blob - doc/man1/notmuch-address.rst
cli: address: Add --filter-by option to configure address filtering
[notmuch.git] / 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. Filtering
15 can be configured with the --filter-by option.
16
17 See **notmuch-search-terms(7)** for details of the supported syntax for
18 <search-terms>.
19
20 Supported options for **address** include
21
22     ``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)
23         Presents the results in either JSON, S-Expressions, newline
24         character separated plain-text (default), or null character
25         separated plain-text (compatible with **xargs(1)** -0 option
26         where available).
27
28     ``--format-version=N``
29         Use the specified structured output format version. This is
30         intended for programs that invoke **notmuch(1)** internally. If
31         omitted, the latest supported version will be used.
32
33     ``--output=(sender|recipients|count)``
34
35         Controls which information appears in the output. This option
36         can be given multiple times to combine different outputs.
37         When neither --output=sender nor --output=recipients is
38         given, --output=sender is implied.
39
40         **sender**
41             Output all addresses from the *From* header.
42
43             Note: Searching for **sender** should be much faster than
44             searching for **recipients**, because sender addresses are
45             cached directly in the database whereas other addresses
46             need to be fetched from message files.
47
48         **recipients**
49             Output all addresses from the *To*, *Cc* and *Bcc*
50             headers.
51
52         **count**
53             Print the count of how many times was the address
54             encountered during search.
55
56             Note: With this option, addresses are printed only after
57             the whole search is finished. This may take long time.
58
59     ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
60         This option can be used to present results in either
61         chronological order (**oldest-first**) or reverse chronological
62         order (**newest-first**).
63
64         By default, results will be displayed in reverse chronological
65         order, (that is, the newest results will be displayed first).
66
67         This option is not supported with --output=count.
68
69     ``--exclude=(true|false)``
70         A message is called "excluded" if it matches at least one tag in
71         search.tag\_exclude that does not appear explicitly in the
72         search terms. This option specifies whether to omit excluded
73         messages in the search process.
74
75         The default value, **true**, prevents excluded messages from
76         matching the search terms.
77
78         **false** allows excluded messages to match search terms and
79         appear in displayed results.
80
81     ``--filter-by=``\ (**nameaddr**\ \|\ **name** \|\ **addr**\ \|\ **addrfold**\ \|\ **nameaddrfold**\)
82
83         Controls how to filter out duplicate addresses. The filtering
84         algorithm receives a sequence of email addresses and outputs
85         the same sequence without the addresses that are considered a
86         duplicate of a previously output address. What is considered a
87         duplicate depends on how the two addresses are compared:
88
89         **nameaddr** means that both name and address parts are
90         compared in case-sensitive manner. Therefore, all same looking
91         addresses strings are considered duplicate. This is the
92         default.
93
94         **name** means that only the name part is compared (in
95         case-sensitive manner). For example, the addresses "John Doe
96         <me@example.com>" and "John Doe <john@doe.name>" will be
97         considered duplicate.
98
99         **addr** means that only the address part is compared (in
100         case-sensitive manner). For example, the addresses "John Doe
101         <john@example.com>" and "Dr. John Doe <john@example.com>" will
102         be considered duplicate.
103
104         **addrfold** is like **addr**, but comparison is done in
105         canse-insensitive manner. For example, the addresses "John Doe
106         <john@example.com>" and "Dr. John Doe <JOHN@EXAMPLE.COM>" will
107         be considered duplicate.
108
109         **nameaddrfold** is like **nameaddr**, but address comparison
110         is done in canse-insensitive manner. For example, the
111         addresses "John Doe <john@example.com>" and "John Doe
112         <JOHN@EXAMPLE.COM>" will be considered duplicate.
113
114 EXIT STATUS
115 ===========
116
117 This command supports the following special exit status codes
118
119 ``20``
120     The requested format version is too old.
121
122 ``21``
123     The requested format version is too new.
124
125 SEE ALSO
126 ========
127
128 **notmuch(1)**, **notmuch-config(1)**, **notmuch-count(1)**,
129 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
130 **notmuch-new(1)**, **notmuch-reply(1)**, **notmuch-restore(1)**,
131 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**,
132 **notmuch-search(1)**