Typo.
[mymail.git] / mymail.1
1 .TH "MYMAIL" "0.9" "February 2013" "Francois Fleuret" "User Commands"
2
3 \" This man page was written by Francois Fleuret <francois@fleuret.org>
4 \" and is distributed under a Creative Commons Attribution-Share Alike
5 \" 3.0 License.
6
7 .SH "NAME"
8
9 mymail \- A simple command line utility for indexing and searching mbox files
10
11 .SH "SYNOPSIS"
12
13 \fBmymail\fP [\fIoptions\fR] [\fI<mbox dir1>\fR [\fI<mbox dir2>\fR ...]]
14
15 .SH "DESCRIPTION"
16
17 \fBmymail\fP is a command line utility to index mbox files and perform
18 quick searches based on sender, subject, etc.
19
20 It is similar in spirit to other existing software such as mu or
21 notmuch, but does not use a real database backend to store and query
22 the index.
23
24 .SH "OPTIONS"
25 .TP
26 \fB-h\fR, \fB--help\fR
27 display help and exit
28 .TP
29 \fB-v\fR, \fB--version\fR
30 print the version number
31 .TP
32 \fB-p <db filename pattern>\fR, \fB--db-pattern <db filename pattern>\fR
33 set the db filename pattern for recursive search
34 .TP
35 \fB-r <db root path>\fR, \fB--db-root <db root path>\fR
36 set the db root path for recursive search
37 .TP
38 \fB-l <db filename list>\fR, \fB--db-list <db filename list>\fR
39 set the semicolon-separated list of db files for search
40 .TP
41 \fB-s <search pattern>\fR, \fB--search <search pattern>\fR
42 search for matching mails in the db file
43 .TP
44 \fB-d <db filename>\fR, \fB--db-file <db filename>\fR
45 set the db filename for indexing
46 .TP
47 \fB-i\fR, \fB--index\fR
48 index mails in the mailboxes located recursively anywhere in the
49 directories following the options on the command lines
50
51 .SH "ENVIRONMENT VARIABLES"
52
53 .TP
54 \fBMYMAIL_DB_PATTERN\fR
55 defaut value for the --db-pattern argument
56 .TP
57 \fBMYMAIL_DB_ROOT\fR
58 defaut value for the --db-root argument
59 .TP
60 \fBMYMAIL_DB_LIST\fR
61 defaut value for the --db-list argument
62 .TP
63 \fBMYMAIL_DB_FILE\fR
64 defaut value for the --db-file argument
65
66 .SH "SEARCH SYNTAX"
67
68 The search conditions take the form of a single letter followed by a
69 space and a regexp, which can itself contain spaces. If the condition
70 is prefaced by the character "!" it is negated, and has to be false
71 for a mail to be selected.
72
73 .TP
74 \fBf <regexp>\fR selects mails whose field From, From:, or Reply-To: matches the regexp.
75 .TP
76 \fBt <regexp>\fR selects mails whose field To:, Cc:, or Bcc: matches the regexp.
77 .TP
78 \fBp <regexp>\fR selects mails whose field From, From:, Reply-To:, To:, Cc:, or Bcc: matches the regexp.
79 .TP
80 \fBs <regexp>\fR selects mails whose field Subject: matches the regexp.
81 .TP
82 \fBd <regexp>\fR selects mails whose field Date: matches the regexp.
83
84 .SH "EXAMPLES"
85
86 To index all the mbox files present in the directories
87 ~/archives/mails/2010 and ~/archives/mails/2011 (recursively) and
88 create a database file /tmp/mymail/2010-2011/mymail.db
89
90 .RS
91 .EX
92 mymail --db-file /tmp/mymail/2010-2011/mymail.db --index ~/archives/mails/2010 ~/archives/mails/2011
93 .EE
94 .RE
95
96 To search in all the database files *.db located (recursively) in
97 /tmp/mymail, for all the mails having bob.something as sender or
98 recipient, without "spam" in the subject, and creating a result mbox
99 file /tmp/mymail/mbox
100
101 .RS
102 .EX
103 mymail --db-pattern '\\.db$' --db-root /tmp/mymail --search 'p bob.something' --search '!s spam' > /tmp/mymail.mbox
104 .EE
105 .RE
106
107 .SH "BUGS"
108
109 None known, probably many.
110
111 .SH "AUTHOR"
112
113 Written by Francois Fleuret <francois@fleuret.org> and distributed
114 under the terms of the GNU General Public License version 3 as
115 published by the Free Software Foundation. This is free software: you
116 are free to change and redistribute it. There is NO WARRANTY, to the
117 extent permitted by law.