]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-address.rst
Merge branch 'release'
[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 where
25     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     Controls which information appears in the output. This option can
34     be given multiple times to combine different outputs.  When
35     neither ``--output=sender`` nor ``--output=recipients`` is
36     given, ``--output=sender`` is implied.
37
38     **sender**
39         Output all addresses from the *From* header.
40
41         Note: Searching for **sender** should be much faster than
42         searching for **recipients**, because sender addresses are
43         cached directly in the database whereas other addresses need
44         to be fetched from message files.
45
46     **recipients**
47         Output all addresses from the *To*, *Cc* and *Bcc* headers.
48
49     **count**
50         Print the count of how many times was the address encountered
51         during search.
52
53         Note: With this option, addresses are printed only after the
54         whole search is finished. This may take long time.
55
56     **address**
57         Output only the email addresses instead of the full mailboxes
58         with names and email addresses. This option has no effect on
59         the JSON or S-Expression output formats.
60
61 ``--deduplicate=(no|mailbox|address)``
62     Control the deduplication of results.
63
64     **no**
65         Output all occurrences of addresses in the matching
66         messages. This is not applicable with ``--output=count``.
67
68     **mailbox**
69         Deduplicate addresses based on the full, case sensitive name
70         and email address, or mailbox. This is effectively the same as
71         piping the ``--deduplicate=no`` output to **sort | uniq**, except
72         for the order of results. This is the default.
73
74     **address**
75         Deduplicate addresses based on the case insensitive address
76         part of the mailbox. Of all the variants (with different name
77         or case), print the one occurring most frequently among the
78         matching messages. If ``--output=count`` is specified, include all
79         variants in the count.
80
81 ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
82     This option can be used to present results in either chronological
83     order (**oldest-first**) or reverse chronological order
84     (**newest-first**).
85
86     By default, results will be displayed in reverse chronological
87     order, (that is, the newest results will be displayed first).
88
89     However, if either ``--output=count`` or ``--deduplicate=address`` is
90     specified, this option is ignored and the order of the results is
91     unspecified.
92
93 ``--exclude=(true|false)``
94     A message is called "excluded" if it matches at least one tag in
95     search.exclude\_tags that does not appear explicitly in the search
96     terms. This option specifies whether to omit excluded messages in
97     the search process.
98
99     The default value, **true**, prevents excluded messages from
100     matching the search terms.
101
102     **false** allows excluded messages to match search terms and
103     appear in displayed results.
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-reply(1)**,
127 **notmuch-restore(1)**,
128 **notmuch-search-terms(7)**,
129 **notmuch-show(1)**,
130 **notmuch-tag(1)**,
131 **notmuch-search(1)**