notmuch-address-cache(1)                                                                                                                notmuch-address-cache(1)



NAME
       notmuch-address-cache - caches the result from notmuch-address and search within this cached version.


SYNOPSIS
       notmuch-address-cache [ COMMAND ] [ ARG ]


DESCRIPTION
       notmuch-address-cache is basically a cache in front of the notmuch-address command.

       notmuch-address-cache caches all sender and recipients you communicated with.


Commands
       help, --help, -h
              Show help text.

       version, --version, -v
              Show the version.

       rebuild, --rebuild, -r [--json | --text]
              Uses  notmuch-address  to  find  all sender/recipient you communicated with and print them out to the file ~/.notmuch-address-cache/addresses. The
              format of the cached addresses are stored in json, if you rebuild your cache with option --json. The format of the cached addresses are stored  in
              text, if you rebuild your cache with option--text. Format text is recommended if you want to query the cache with mutt. Format json is recommended
              if you want to query the cache with alot.

       update, --update, -u [--json | --text]
              Uses notmuch-address to find all sender/recipient, based on the tag:new, you communicated with and  prepend  them  out  to  the  file  ~/.notmuch-
              address-cache/addresses. It expect the notmuch tag tag:new on all messages to extract the sender and recipients from there. You can configure not-
              much to apply the tag:new to all messages. This is basically done if you edit the file ~/.notmuch-config, go into section [new] and add the  value
              new  to  the  key  tags. For more details see https://notmuchmail.org/initial_tagging/ in section 'The new tag approach'. The format of the cached
              addresses are stored in json, if you update your cache with option --json. The format of the cached addresses are stored in text,  if  you  update
              your cache with option --text.

       query, --query, -q
              Greps the cache file for the given query. Interpret the query as an extended regular expression. Perform case insesitive matching.


Example Workflow - Rebuild the cache
       mutt - Using mutt as mua
              Rebuild  your  cache by Executing notmuch-address-cache rebuild --text. Edit your .muttrc file and add the query command set query_command = "not-
              much-address-cache query '%s'".

       alot - Using alot as mua
              Rebuild your cache by Executing notmuch-address-cache rebuild --json. Edit your .config/alot/config file and add the query command under the abook
              section.  command = 'notmuch-address-cache query'.

              [accounts]
                [[youraccount]]
                  [[abook]]
                    type = shellcommand
                    command = 'notmuch-address-cache query'
                    regexp = '\[?{"name": "(?P<name>.*)", "address": "(?P<email>.+)", "name-addr": ".*"}[,\]]?'
                    shellcommand_external_filtering = False


Example Workflow - Update the cache based on new incoming emails
       Setup  notmuch  to  use 'The new tag approach'. The new approach is there to act only on new emails instead of the whole mail database. This will speedup
       the entire update of your address cache. See https://notmuchmail.org/initial_tagging/. After that you can do it manual by executing notmuch-address-cache
       update --json or notmuch-address-cache update --text.

       If  you  are  using  offlineimap  you  can configure a postsynchook to update your cache. See e.g. http://www.offlineimap.org/doc/ConfigurationFactoriza-
       tion.html.



version v0.2                                                                 Sep 2017                                                    notmuch-address-cache(1)