1MAIRIXRC(5)                   File Formats Manual                  MAIRIXRC(5)
2
3
4

NAME

6       mairixrc - configuration file for mairix(1)
7

SYNOPSIS

9       $HOME/.mairixrc
10

DESCRIPTION

12       The mairixrc file tells mairix where your mail folders are located.  It
13       also tells mairix where the results of searches are to be written.
14
15       mairix searches for this file at $HOME/.mairixrc unless the  -f  option
16       is used.
17
18       The  directives  base,  mfolder, and database must always appear in the
19       file.  There must also be some folder definitions (using  the  maildir,
20       mh, or mbox) directives.
21
22
23   Comments
24       Any line starting with a '#' character is treated as a comment.
25
26
27   Directives
28       base=base-directory
29              This defines the path to the common parent directory of all your
30              maildir folders.
31
32              If the path is relative, it is treated as relative to the  loca‐
33              tion of the mairixrc file.
34
35
36       maildir=list-of-folder-specifications
37              This  is a colon-separated list of the Maildir folders (relative
38              to `base') that you want indexed.  Any entry that ends `...'  is
39              recursively scanned to find any Maildir folders underneath it.
40
41              More  than one line starting with `maildir' can be included.  In
42              this case, mairix joins the lines together with colons as though
43              a  single  list  of folders had been given on a single very long
44              line.
45
46              Each colon-separated entry may be a wildcard.  See  the  discus‐
47              sion under mbox (below) for the wildcard syntax.  For example
48
49                   maildir=zzz/foo*...
50
51              will  match  maildir  folders  like these (relative to the base-
52              directory)
53
54                   zzz/foobar/xyz
55                   zzz/fooquux
56                   zzz/foo
57                   zzz/fooabc/u/v/w
58
59
60
61              and
62
63                   maildir=zzz/foo[abc]*
64
65              will  match  maildir  folders  like  these  (relative   to   the
66              folder_base)
67
68                   zzz/fooa
69                   zzz/fooaaaxyz
70                   zzz/foobcd
71                   zzz/fooccccccc
72
73              If  a  folder name contains a colon, you can write this by using
74              the sequence '\:' to escape the colon.  Otherwise, the backslash
75              character  is  treated  normally.   (If the folder name actually
76              contains the sequence '\:', you're out of luck.)
77
78
79       mh=list-of-folder-specifications
80              This is a colon-separated list of the MH  folders  (relative  to
81              `base')  that  you  want  indexed.  Any entry that ends '...' is
82              recursively scanned to find any MH folders underneath it.
83
84              More than one line starting with 'mh' can be included.  In  this
85              case,  mairix  joins  the lines together with colons as though a
86              single list of folders had been given  on  a  single  very  long
87              line.
88
89              Each colon-separated entry may be a wildcard, see the discussion
90              under maildir (above) and mbox (below) for the syntax and seman‐
91              tics of specifying wildcards.
92
93              recognizes  the  types  of  MH  folders created by the following
94              email applications:
95
96              *      xmh
97
98              *      sylpheed
99
100              *      claws-mail
101
102              *      evolution
103
104              *      NNML
105
106              *      Mew
107
108
109       mbox=list-of-folder-specifications
110              This is a colon-separated list of the mbox folders (relative  to
111              `base') that you want indexed.
112
113              Each  colon-separated item in the list can be suffixed by '...'.
114              If the item matches a regular file, that file is  treated  as  a
115              mbox  folder  and  the  '...'  suffix  is  ignored.  If the item
116              matches a directory, a recursive scan of everything inside  that
117              directory  is  made, and all regular files are initially consid‐
118              ered as mbox folders.  (Any directories found in this  scan  are
119              themselves scanned, since the scan is recursive.)
120
121              Each  colon-separated  item  may contain wildcard operators, but
122              only in its final path component.  The wildcard  operators  cur‐
123              rently supported are
124
125
126       *
127              Match  zero  or more characters (each character matched is arbi‐
128              trary)
129
130
131       ?
132              Match exactly one arbitrary character
133
134
135       [abcs-z]
136              Character class : match a single character from the set a, b, c,
137              s, t, u, v, w, x, y and z.
138
139              To  include  a  literal  ']'  in the class, place it immediately
140              after the opening '['.  To include a literal '-' in  the  class,
141              place it immediately before the closing ']'.
142
143              If  these  metacharacters  are included in non-final path compo‐
144              nents, they have no special meaning.
145
146              Here are some examples
147
148
149       mbox=foo/bar*
150              matches 'foo/bar', 'foo/bar1', 'foo/barrrr' etc
151
152
153       mbox=foo*/bar*
154              matches 'foo*/bar', 'foo*/bar1', 'foo*/barrrr' etc
155
156
157       mbox=foo/*
158              matches 'foo/bar', 'foo/bar1', 'foo/barrrr', 'foo/foo',  ´foo/x'
159              etc
160
161
162       mbox=foo...
163              matches any regular file in the tree rooted at 'foo'
164
165
166       mbox=foo/*...
167              same as before
168
169
170       mbox=foo/[a-z]*...
171              matches     'foo/a',    'foo/aardvark/xxx',    'foo/zzz/foobar',
172              ´foo/w/x/y/zzz', but not 'foo/A/foobar'
173
174              Regular files that  are  mbox  folder  candidates  are  examined
175              internally.  Only files containing standard mbox 'From ' separa‐
176              tor lines will be scanned for messages.
177
178              If a regular file has a name ending in '.gz', and  gzip  support
179              is  compiled into the mairix binary, the file will be treated as
180              a gzipped mbox.
181
182              If a regular file has a name ending in '.bz2', and bzip  support
183              is  compiled into the mairix binary, the file will be treated as
184              a bzip2'd mbox.
185
186              More than one line starting with 'mbox'  can  be  included.   In
187              this case, mairix joins the lines together with colons as though
188              a single list of folders had been given on a  single  very  long
189              line.
190
191              mairix  performs no locking of mbox folders when it is accessing
192              them.  If a mail delivery program is modifying the mbox  at  the
193              same  time,  it  is likely that one or messages in the mbox will
194              never get indexed by mairix (until the database is  removed  and
195              recreated  from scratch, anyway.)  The assumption is that mairix
196              will be used to index archive folders rather than incoming ones,
197              so this is unlikely to be much of a problem in reality.
198
199              mairix  can  support  a  maximum of 65536 separate mboxes, and a
200              maximum of 65536 messages within any one mbox.
201
202
203       omit=list-of-glob-patterns
204              This is a colon-separated list of glob patterns for  folders  to
205              be  omitted  from  the indexing.  This allows wide wildcards and
206              recursive elements to be used in the maildir,mh, andmbox  direc‐
207              tives,  with the omit option used to selectively remove unwanted
208              folders from the folder lists.
209
210              Within the glob patterns, a single '*' matches any  sequence  of
211              characters other than '/'.  However '**' matches any sequence of
212              characters including '/'.  This allows glob patterns to be  con‐
213              structed which have a wildcard for just one directory component,
214              or for any number of directory components.
215
216              The _omit_ option can be specified as many times as required  so
217              that the list of patterns doesn't all have to fit on one line.
218
219              As an example,
220
221                   mbox=bulk...
222                   omit=bulk/spam*
223
224              will index all mbox folders at any level under the 'bulk' subdi‐
225              rectory of the base folder, except for those folders whose names
226              start 'bulk/spam', e.g. 'bulk/spam', 'bulk/spam2005' etc.
227
228              In constrast,
229
230                   mbox=bulk...
231                   omit=bulk/spam**
232
233              will index all mbox folders at any level under the 'bulk' subdi‐
234              rectory of the base folder, except for those folders whose names
235              start    'bulk/spam',    e.g.    'bulk/spam',   'bulk/spam2005',
236              ´bulk/spam/2005', 'bulk/spam/2005/jan' etc.
237
238
239       nochecks
240              This takes no arguments.  If a line starting  with  nochecks  is
241              present, it is the equivalent of specifying the -Q flag to every
242              indexing run.
243
244
245       mfolder=match-folder-name
246              This defines the name of the folder (within the directory speci‐
247              fied by base) into which the search mode writes its output.  (If
248              the mformat used is 'raw' or 'excerpt', then this setting is not
249              used and may be omitted.)
250
251              The  mfolder  setting may be over-ridden for a particular search
252              by using the -o option to mairix.
253
254              mairix will refuse to output search results  to  a  folder  that
255              appears  to  be amongst those that are indexed.  This is to pre‐
256              vent accidental deletion of emails.
257
258              If the first character of the mfolder value is '/' or '.', it is
259              taken  as a pathname in its own right.  This allows you to spec‐
260              ify absolute paths and paths relative to the  current  directory
261              where  the  mfolder  should be written.  Otherwise, the value of
262              mfolder is appended to the value of base, in the same way as for
263              the source folders.
264
265
266       mformat=format
267              This  defines the type of folder used for the match folder where
268              the search results go.  There are four valid settings  for  for‐
269              mat, namely 'maildir', 'mh', 'mbox', 'raw' or 'excerpt'.  If the
270              'raw' setting is used then mairix will just print out  the  path
271              names  of  the files that match and no match folder will be cre‐
272              ated.  If the 'excerpt' setting is used, mairix will also  print
273              out  the  To:,  Cc:,  From:,  Subject:  and Date: headers of the
274              matching messages.  'maildir' is the default if this  option  is
275              not defined.  The setting is case-insensitive.
276
277
278       database=path-to-database
279              This  defines  the  path  where mairix's index database is kept.
280              You can keep this file anywhere you like.
281
282              Currently, mairix will place a single database file at the loca‐
283              tion  indicated  by path-to-database.  However, a future version
284              of mairix may instead place a directory containing several files
285              at this location.
286
287              path-to-database  should  be an absolute pathname (starting with
288              '/').  If a relative pathname is used, it  will  be  interpreted
289              relative  to  the  current  directory at the time mairix is run,
290              (not relative to the location of the mairixrc file  or  anything
291              like that.)
292
293
294   Expansions
295       The part of each line in '.mairixrc' following the equals sign can con‐
296       tain the following types of expansion:
297
298
299       Home directory expansion
300              If the sequence '~/' appears at the start of the text after  the
301              equals sign, it is expanded to the user's home directory.  Exam‐
302              ple:
303
304                   database=~/Mail/mairix_database
305
306
307
308       Environment expansion
309              If a '$' is followed by a sequence of  alpha-numeric  characters
310              (or  ´_'), the whole string is replaced by looking up the corre‐
311              sponding environment variable.  Similarly, if '$' is followed by
312              an  open  brace  ('{'), everything up to the next close brace is
313              looked up as an environment variable and the result replaces the
314              entire sequence.
315
316              Suppose in the shell we do
317
318                   export FOO=bar
319
320              and the '.mairixrc' file contains
321
322                   maildir=xxx/$FOO
323                   mbox=yyy/a${FOO}b
324
325              this is equivalent to
326
327                   maildir=xxx/bar
328                   mbox=yyy/abarb
329
330              If  the  specified environment variable is not set, the replace‐
331              ment is the empty string.
332
333

NOTES

335       An alternative path to the configuration file may be given with the  -f
336       option to mairix(1).
337
338
339
340
341
342                                 January 2006                      MAIRIXRC(5)
Impressum