1MU(CFIND)                        User Manuals                        MU(CFIND)
2
3
4

NAME

6       mu  cfind  is  the  mu  command to find contacts in the mu database and
7       export them for use in other programs.
8
9

SYNOPSIS

11       mu cfind [options] [<pattern>]
12
13

DESCRIPTION

15       mu cfind is the mu  command  for  finding  contacts  (name  and  e-mail
16       address  of  people  who  were  either an e-mail's sender or receiver).
17       There are different output formats available, for  importing  the  con‐
18       tacts into other programs.
19
20

SEARCHING CONTACTS

22       When  you  index  your  messages  (see  mu index), mu creates a list of
23       unique e-mail addresses found and the  accompanying  name,  and  caches
24       this  list.  In  case  the  same  e-mail address is used with different
25       names, the most recent non-empty name is used.
26
27       mu cfind starts a search for contacts that match a regular  expression.
28       For example:
29
30          $ mu cfind '@gmail.com'
31
32       would find all contacts with a gmail-address, while
33
34          $ mu cfind Mary
35
36       lists all contacts with Mary in either name or e-mail address.
37
38       If  you  do  not specify a search expression, mu cfind returns the full
39       list of contacts. Note, mu cfind uses a cache with the e-mail  informa‐
40       tion, which is populated during the indexing process.
41
42       The  regular  expressions  are Perl-compatible (as per the PCRE-library
43       used by GRegex).
44
45

OPTIONS

47       --format=plain|mutt-alias|mutt-ab|wl|org-contact|bbdb|csv
48              sets the output format to the given  value.  The  following  are
49              available:
50
51              | --format=   | description                       |
52              |-------------+-----------------------------------|
53              | plain       | default, simple list              |
54              | mutt-alias  | mutt alias-format                 |
55              | mutt-ab     | mutt external address book format |
56              | wl          | wanderlust addressbook format     |
57              | org-contact | org-mode org-contact format       |
58              | bbdb        | BBDB format                       |
59              | csv         | comma-separated values (*)     |
60
61
62              (*)  CSV  is  not  fully standardized, but mu cfind follows some
63              common practices: any double-quote is replaced by a  double-dou‐
64              ble  quote (thus, "hello" become ""hello"", and fields with com‐
65              mas are put in double-quotes. Normally, this should  only  apply
66              to name fields.
67
68
69       --personal  only  show  addresses seen in messages where one of 'my' e-
70       mail
71              addresses was seen in one of the  address  fields;  this  is  to
72              exclude  addresses  only  seen in mailing-list messages. See the
73              --my-address parameter in mu index.
74
75
76       --after=<timestamp> only show addresses last seen after
77              <timestamp>. <timestamp> is a UNIX time_t value, the  number  of
78              seconds since 1970-01-01 (in UTC).
79
80              From  the command line, you can use the date command to get this
81              value. For example, only  consider  addresses  last  seen  after
82              2009-06-01, you could specify
83                --after=`date +%s --date='2009-06-01'`
84
85

RETURN VALUE

87       mu  cfind returns 0 upon successful completion -- that is, at least one
88       contact was found. Anything else leads to a non-zero return value:
89
90       | code | meaning                        |
91       |------+--------------------------------|
92       |    0 | ok                             |
93       |    1 | general error                  |
94       |    2 | no matches (for 'mu cfind')    |
95
96

INTEGRATION WITH MUTT

98       You can use mu cfind as an external address book server for mutt.   For
99       this to work, add the following to your muttrc:
100
101       set query_command = "mu cfind --format=mutt-ab '%s'"
102
103       Now,  in mutt, you can search for e-mail addresses using the query-com‐
104       mand, which is (by default) accessible by pressing Q.
105
106

ENCODING

108       mu cfind output is encoded according to the current locale  except  for
109       --format=bbdb.  This  is  hard-coded to UTF-8, and as such specified in
110       the output-file, so emacs/bbdb can  handle  things  correctly,  without
111       guessing.
112
113

BUGS

115       Please      report      bugs      if      you      find     them     at
116       https://github.com/djcb/mu/issues.
117
118

AUTHOR

120       Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
121
122

SEE ALSO

124       mu(1), mu-index(1), mu-find(1), pcrepattern(3)
125
126
127
128April 2019                             1                             MU(CFIND)
Impressum