MAIRIXRC(5) | File Formats Manual | MAIRIXRC(5) |
mairixrc - configuration file for mairix(1)
$HOME/.mairixrc
The mairixrc file tells mairix where your mail folders are located. It also tells mairix where the results of searches are to be written.
mairix searches for this file at $HOME/.mairixrc unless the -f option is used.
The directives base, mfolder, and database must always appear in the file. There must also be some folder definitions (using the maildir, mh, or mbox) directives.
Any line starting with a '#' character is treated as a comment.
More than one line starting with `maildir' can be included. In this case, mairix joins the lines together with colons as though a single list of folders had been given on a single very long line.
Each colon-separated entry may be a wildcard. See the discussion under mbox (below) for the wildcard syntax. For example
maildir=zzz/foo*...
zzz/foobar/xyz zzz/fooquux zzz/foo zzz/fooabc/u/v/w
and
maildir=zzz/foo[abc]*
zzz/fooa zzz/fooaaaxyz zzz/foobcd zzz/fooccccccc
More than one line starting with 'mh' can be included. In this case, mairix joins the lines together with colons as though a single list of folders had been given on a single very long line.
Each colon-separated entry may be a wildcard, see the discussion under maildir (above) and mbox (below) for the syntax and semantics of specifying wildcards.
mairix recognizes the types of MH folders created by the following email applications:
Each colon-separated item in the list can be suffixed by '...'. If the item matches a regular file, that file is treated as a mbox folder and the '...' suffix is ignored. If the item matches a directory, a recursive scan of everything inside that directory is made, and all regular files are initially considered as mbox folders. (Any directories found in this scan are themselves scanned, since the scan is recursive.)
Each colon-separated item may contain wildcard operators, but only in its final path component. The wildcard operators currently supported are
To include a literal ']' in the class, place it immediately after the opening '['. To include a literal '-' in the class, place it immediately before the closing ']'.
If these metacharacters are included in non-final path components, they have no special meaning.
Here are some examples
Regular files that are mbox folder candidates are examined internally. Only files containing standard mbox 'From ' separator lines will be scanned for messages.
If a regular file has a name ending in '.gz', and gzip support is compiled into the mairix binary, the file will be treated as a gzipped mbox.
If a regular file has a name ending in '.bz2', and bzip support is compiled into the mairix binary, the file will be treated as a bzip2'd mbox.
More than one line starting with 'mbox' can be included. In this case, mairix joins the lines together with colons as though a single list of folders had been given on a single very long line.
mairix performs no locking of mbox folders when it is accessing them. If a mail delivery program is modifying the mbox at the same time, it is likely that one or messages in the mbox will never get indexed by mairix (until the database is removed and recreated from scratch, anyway.) The assumption is that mairix will be used to index archive folders rather than incoming ones, so this is unlikely to be much of a problem in reality.
mairix can support a maximum of 65536 separate mboxes, and a maximum of 65536 messages within any one mbox.
These folders must all be located on the same account on the same IMAP server. The configuration options imap_server and imap_pipe specify how to connect to the IMAP server.
More than one line starting with 'imap' can be included. In this case, mairix joins the lines together with colons as though a single list of folders had been given on a single very long line.
Within the glob patterns, a single '*' matches any sequence of characters other than '/'. However '**' matches any sequence of characters including '/'. This allows glob patterns to be constructed which have a wildcard for just one directory component, or for any number of directory components.
The _omit_ option can be specified as many times as required so that the list of patterns doesn't all have to fit on one line.
As an example,
mbox=bulk... omit=bulk/spam*
In constrast,
mbox=bulk... omit=bulk/spam**
The mfolder setting may be over-ridden for a particular search by using the -o option to mairix.
mairix will refuse to output search results to a folder that appears to be amongst those that are indexed. This is to prevent accidental deletion of emails.
If the first character of the mfolder value is '/' or '.', it is taken as a pathname in its own right. This allows you to specify absolute paths and paths relative to the current directory where the mfolder should be written. Otherwise, the value of mfolder is appended to the value of base, in the same way as for the source folders.
Currently, mairix will place a single database file at the location indicated by path-to-database. However, a future version of mairix may instead place a directory containing several files at this location.
path-to-database should be an absolute pathname (starting with '/'). If a relative pathname is used, it will be interpreted relative to the current directory at the time mairix is run, (not relative to the location of the mairixrc file or anything like that.)
The part of each line in '.mairixrc' following the equals sign can contain the following types of expansion:
database=~/Mail/mairix_database
Suppose in the shell we do
export FOO=bar
maildir=xxx/$FOO mbox=yyy/a${FOO}b
maildir=xxx/bar mbox=yyy/abarb
An alternative path to the configuration file may be given with the -f option to mairix(1).
January 2006 |