summaryrefslogtreecommitdiff
path: root/manpages/notmuch-address-1.mdwn
blob: 30d8ceca5a9b4851d7742af7669b7b05593a23cc (plain)
<h1>NOTMUCH-ADDRESS(1)</h1>

<h2>NAME</h2>
<pre>
       notmuch-address - output addresses from matching messages
</pre>

<h2>SYNOPSIS</h2>
<pre>
       <b>notmuch</b> <b>address</b> [<u>option</u> ...] &lt;<u>search-term</u>&gt; ...
</pre>

<h2>DESCRIPTION</h2>
<pre>
       Search  for  messages  matching the given search terms, and display the
       addresses from them. Duplicate addresses are filtered out.

       See <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of  the  supported  syntax  for
       &lt;search-terms&gt;.

       Supported options for <b>address</b> include

       <b>--format=(json|sexp|text|text0)</b>
              Presents  the  results  in  either  JSON, S-Expressions, newline
              character separated plain-text (default), or null character sep‐
              arated  plain-text  (compatible  with  <b>xargs</b>(1)  -0 option where
              available).

       <b>--format-version=N</b>
              Use the specified structured output format version. This is  in‐
              tended  for programs that invoke <a href='../notmuch-1/'>notmuch</a>(1) internally. If omit‐
              ted, the latest supported version will be used.

       <b>--output=(sender|recipients|count|address)</b>
              Controls which information appears in the  output.  This  option
              can  be given multiple times to combine different outputs.  When
              neither <b>--output=sender</b> nor <b>--output=recipients</b> is given, <b>--out-</b>
              <b>put=sender</b> is implied.

              <b>sender</b> Output all addresses from the <u>From</u> header.

                     Note:  Searching  for  <b>sender</b>  should be much faster than
                     searching for <b>recipients</b>, because  sender  addresses  are
                     cached  directly  in the database whereas other addresses
                     need to be fetched from message files.

              <b>recipients</b>
                     Output all addresses from the <u>To</u>, <u>Cc</u> and <u>Bcc</u> headers.

              <b>count</b>  Print the count of how many times was the address encoun‐
                     tered during search.

                     Note:  With this option, addresses are printed only after
                     the whole search is finished. This may take long time.

              <b>address</b>
                     Output only the email addresses instead of the full mail‐
                     boxes  with names and email addresses. This option has no
                     effect on the JSON or S-Expression output formats.

       <b>--deduplicate=(no|mailbox|address)</b>
              Control the deduplication of results.

              <b>no</b>     Output all occurrences of addresses in the matching  mes‐
                     sages. This is not applicable with <b>--output=count</b>.

              <b>mailbox</b>
                     Deduplicate  addresses  based on the full, case sensitive
                     name and email address, or mailbox. This  is  effectively
                     the  same as piping the <b>--deduplicate=no</b> output to <b>sort</b> <b>|</b>
                     <b>uniq</b>, except for the order of results. This  is  the  de‐
                     fault.

              <b>address</b>
                     Deduplicate  addresses  based on the case insensitive ad‐
                     dress part of the mailbox. Of all the variants (with dif‐
                     ferent  name  or case), print the one occurring most fre‐
                     quently among the matching messages. If <b>--output=count</b> is
                     specified, include all variants in the count.

       <b>--sort=(newest-first|oldest-first)</b>
              This option can be used to present results in either chronologi‐
              cal order (<b>oldest-first</b>) or reverse  chronological  order  (<b>new-</b>
              <b>est-first</b>).

              By  default,  results will be displayed in reverse chronological
              order, (that is, the newest results will be displayed first).

              However, if either <b>--output=count</b>  or  <b>--deduplicate=address</b>  is
              specified,  this  option is ignored and the order of the results
              is unspecified.

       <b>--exclude=(true|false)</b>
              A message is called &quot;excluded&quot; if it matches at least one tag in
              search.exclude_tags  that  does  not  appear  explicitly  in the
              search terms. This option specifies  whether  to  omit  excluded
              messages in the search process.

              The  default value, <b>true</b>, prevents excluded messages from match‐
              ing the search terms.

              <b>false</b> allows excluded messages to match search terms and  appear
              in displayed results.
</pre>

<h2>EXIT STATUS</h2>
<pre>
       This command supports the following special exit status codes

       <b>20</b>     The requested format version is too old.

       <b>21</b>     The requested format version is too new.
</pre>

<h2>SEE ALSO</h2>
<pre>
       <a href='../notmuch-1/'>notmuch</a>(1),  <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>not‐</a>
       <a href='../notmuch-hooks-5/'>much-hooks</a>(5),  <a href='../notmuch-insert-1/'>notmuch-insert</a>(1),  <a href='../notmuch-new-1/'>notmuch-new</a>(1),   <a href='../notmuch-reply-1/'>notmuch-reply</a>(1),
       <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),  <a href='../notmuch-search-1/'>notmuch-search</a>(1),  <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7),  <a href='../notmuch-show-1/'>not‐</a>
       <a href='../notmuch-show-1/'>much-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
</pre>

<h2>AUTHOR</h2>
<pre>
       Carl Worth and many others
</pre>

<h2>COPYRIGHT</h2>
<pre>
       2009-2022, Carl Worth and many others
</pre>

<h2>0.35</h2>