1 .TH "MYMAIL" "0.9" "February 2013" "Francois Fleuret" "User Commands"
3 \" This man page was written by Francois Fleuret <francois@fleuret.org>
4 \" and is distributed under a Creative Commons Attribution-Share Alike
9 mymail \- A simple command line utility for indexing and searching mbox files
13 \fBmymail\fP [\fIoptions\fR] [\fI<mbox dir1>\fR [\fI<mbox dir2>\fR ... ]|\fI<db file1>\fR [\fI<db file2>\fR ... ]]\n");
17 \fBmymail\fP is a command line utility to index mbox files and perform
18 quick searches based on sender, subject, etc.
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
26 \fB-h\fR, \fB--help\fR
29 \fB-v\fR, \fB--version\fR
30 print the version number
32 \fB-p <db filename pattern>\fR, \fB--db-pattern <db filename pattern>\fR
33 set the db filename pattern for recursive search
35 \fB-r <db root path>\fR, \fB--db-root <db root path>\fR
36 set the db root path for recursive search
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
41 \fB-s <search pattern>\fR, \fB--search <search pattern>\fR
42 search for matching mails in the db file
44 \fB-d <db filename>\fR, \fB--db-file <db filename>\fR
45 set the db filename for indexing
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
51 .SH "ENVIRONMENT VARIABLES"
54 \fBMYMAIL_DB_PATTERN\fR
55 defaut value for the --db-pattern argument
58 defaut value for the --db-root argument
61 defaut value for the --db-list argument
64 defaut value for the --db-file argument
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.
74 \fBf <regexp>\fR (from) selects mails whose leading line From, or
75 fields From:, or Reply-To: matches the regexp.
77 \fBt <regexp>\fR (to) selects mails whose field To:, Cc:, or Bcc: matches the regexp.
79 \fBp <regexp>\fR (participant) selects mails whose leading line From,
80 or fields From:, Reply-To:, To:, Cc:, or Bcc: matches the regexp.
82 \fBs <regexp>\fR (subject) selects mails whose field Subject: matches the regexp.
84 \fBd <regexp>\fR (date) selects mails whose field Date: matches the regexp.
88 To index all the mbox files present in the directories
89 ~/archives/mails/2010 and ~/archives/mails/2011 (recursively) and
90 create a database file /tmp/mymail/2010-2011/mymail.db
94 mymail --db-file /tmp/mymail/2010-2011/mymail.db --index ~/archives/mails/2010 ~/archives/mails/2011
98 To search in all the database files *.db located (recursively) in
99 /tmp/mymail, for all the mails having bob.something as sender or
100 recipient, without "spam" in the subject, and create a result mbox
101 file /tmp/mymail/mbox
105 mymail --db-pattern '\\.db$' --db-root /tmp/mymail --search 'p bob.something' --search '!s spam' > /tmp/mymail.mbox
111 None known, probably many.
115 Written by Francois Fleuret <francois@fleuret.org> and distributed
116 under the terms of the GNU General Public License version 3 as
117 published by the Free Software Foundation. This is free software: you
118 are free to change and redistribute it. There is NO WARRANTY, to the
119 extent permitted by law.