1This is mboxgrep.info, produced by makeinfo version 4.3 from
2mboxgrep.texi.
3
4INFO-DIR-SECTION Mail
5START-INFO-DIR-ENTRY
6* mboxgrep: (mboxgrep).		A mail folder scanning utility.
7END-INFO-DIR-ENTRY
8
9
10File: mboxgrep.info,  Node: Top,  Up: (dir)
11
12   This file documents `mboxgrep' (version 0.7.9), a mailbox scanning
13utility.
14
15   Copyright (C) 2000, 2001, 2002, 2003 Daniel Spiljar
16
17* Menu:
18
19* Introduction::	A short preface.
20* Invoking::		Command-line arguments.
21* Examples::		A few examples of usage.
22* Bugs::		What to do with bugs and similar vermin.
23
24* To Vicky::            Author's dedication.
25
26
27File: mboxgrep.info,  Node: Introduction,  Next: Invoking,  Up: Top
28
29Introduction
30************
31
32   `mboxgrep' is a small, non-interactive utility that scans mail
33folders for messages matching regular expressions.
34
35   It supports basic and extended POSIX regular expressions.
36`Perl'-style regular expressions are supported as well, if `mboxgrep'
37is linked with PCRE library.
38
39   Found messages can be either displayed on standard output, counted,
40deleted, piped to a specified command, or copied to another mailbox.
41
42   It can read and write a variety of folder formats:
43
44   * mbox folders, either plain or compressed
45
46   * MH folders
47
48   * nnml and nnmh folders used by Gnus
49
50   * `qmail'-style maildirs
51
52   Additionally, it can read mbox folders or output from another
53`mboxgrep' process from standard input.  It does so if a single dash
54(-) is given as a file name.
55
56
57File: mboxgrep.info,  Node: Invoking,  Next: Examples,  Prev: Introduction,  Up: Top
58
59Command-Line Arguments
60**********************
61
62   The syntax of `mboxgrep' invocation is:
63
64     mboxgrep [OPTIONS] PATTERN [MAILBOX]
65
66* Menu:
67
68* Miscellaneous::
69* File locking::
70* Regexp selection::
71* Output control::
72* Search scope selection::
73* Mailbox type selection::
74
75
76File: mboxgrep.info,  Node: Miscellaneous,  Next: File locking,  Up: Invoking
77
78`--help'
79`-h'
80     Display a brief help screen and exit.
81
82`--version'
83`-V'
84     Display program version and copyright information and exit.
85
86`--recursive'
87`-r'
88     Descend into directories recursively.
89
90
91File: mboxgrep.info,  Node: File locking,  Next: Regexp selection,  Prev: Miscellaneous,  Up: Invoking
92
93   When accessing mbox folders, `mboxgrep' puts a shared lock on files
94by default.  Note that mbox folders normally should not be accessed
95without locking.
96
97`--file-lock=METHOD'
98`-l METHOD'
99     Specify file locking METHOD.  `mboxgrep' supports `flock' and
100     `fcntl' file locking.  However, one of these methods may be
101     unimplemented on your operating system and thus not available in
102     `mboxgrep' at run time.  To disable file locking, specify `none'.
103
104`--no-file-lock'
105`-nl'
106     Do not attempt to lock mbox folder files.
107
108
109File: mboxgrep.info,  Node: Regexp selection,  Next: Output control,  Prev: File locking,  Up: Invoking
110
111`--extended-regexp'
112`-E'
113     PATTERN is an extended regular expression.
114
115`--basic-regexp'
116`-G'
117     PATTERN is a basic regular expression.
118
119`--perl-regexp'
120`-P'
121     PATTERN is a Perl regular expression.
122
123`--regexp=PATTERN'
124`-e PATTERN'
125     Use PATTERN as a regular expression.
126
127`--ignore-case'
128`-i'
129     Perform case-insensitive search.
130
131`--invert-match'
132`-v'
133     Invert the sense of matching, i.e. select only non-matching
134     messages.
135
136
137File: mboxgrep.info,  Node: Output control,  Next: Search scope selection,  Prev: Regexp selection,  Up: Invoking
138
139   By default, `mboxgrep' writes found messages to standard output.
140The options below change such behavior.
141
142`--count'
143`-c'
144     Suppress normal output and print the count of matching (or
145     non-matching, if used with the `-v' option) messages.
146
147`--delete'
148`-d'
149     Suppress normal output and delete selected messages.
150
151     Use with extreme caution.
152
153`--no-duplicates'
154`-nd'
155     Ignore duplicate messages.
156
157`--output=FOLDER'
158`-o FOLDER'
159     Suppress normal output and write messages to destination folder
160     FOLDER instead.
161
162     Note that `mboxgrep' assumes the output folder is of the same
163     format as the input folder.  Currently there is no possibility to
164     convert folders.
165
166`--pipe=COMMAND'
167`-p COMMAND'
168     Suppress normal output and pipe each selected message to a separate
169     instance of COMMAND.
170
171`--no-messages'
172`-s'
173     Suppress error messages.
174
175
176File: mboxgrep.info,  Node: Search scope selection,  Next: Mailbox type selection,  Prev: Output control,  Up: Invoking
177
178`--headers'
179`-H'
180     Match PATTERN against message headers.
181
182`--body'
183`-B'
184     Match PATTERN against message body.
185
186
187File: mboxgrep.info,  Node: Mailbox type selection,  Prev: Search scope selection,  Up: Invoking
188
189`--mailbox-format=FORMAT'
190`-m FORMAT'
191     Specify mailbox FORMAT.  Supported formats are `mbox' (default),
192     `zmbox' (gzip compressed mbox), `bzmbox' (bzip2 compressed mbox)
193     `mh', `nnml', `nnmh', and `maildir'.
194
195
196File: mboxgrep.info,  Node: Examples,  Next: Bugs,  Prev: Invoking,  Up: Top
197
198Examples
199********
200
201   Scan `$MAIL' for messages from Dirty Harry:
202
203     mboxgrep -H '^From:.*callahan@homicide\.SFPD\.gov' $MAIL
204
205   Re-mail to George messages that mention his name:
206
207     mboxgrep --pipe="/usr/lib/sendmail george" --ignore-case george ~/Mail/*
208
209   Display all messages in folder `~/Mail/incoming', except those that
210appear to originate from AOL:
211
212     mboxgrep -v -H '^Received:.*aol\.com' ~/Mail/incoming
213
214   Do a case-insensitive scan of `~/Mail/incoming' for messages with
215subject "Weekly News" and write them to folder `~/Mail/archive':
216
217     mboxgrep -o ~/Mail/archive -H -i '^Subject: Weekly News' ~/Mail/incoming
218
219   Count _all_ messages stored in folder `spam', ignoring duplicates:
220
221     mboxgrep -nd -c . spam
222
223
224File: mboxgrep.info,  Node: Bugs,  Next: To Vicky,  Prev: Examples,  Up: Top
225
226Detecting Vermin
227****************
228
229   Shortly, if `mboxgrep' crashes and/or works differently than
230described in this manual, you've found a bug.
231
232   Please report bugs to <dspiljar@world.std.com>.  Instructions how to
233reproduce the bug or output from a debugger would be highly
234appreciated. Don't, however, send any coredumps.
235
236
237File: mboxgrep.info,  Node: To Vicky,  Prev: Bugs,  Up: Top
238
239Author's Dedication
240*******************
241
242   `Mboxgrep' is dedicated in loving memory of Vicky, my cat who died
243of tumor on Sep 12, 2002.
244
245   You haven't been long with us, but you gave us a lot of joy and all
246your big heart that stopped ticking too early. I will never forget you.
247Sleep well, little friend.
248
249
250
251Tag Table:
252Node: Top197
253Node: Introduction598
254Node: Invoking1469
255Node: Miscellaneous1830
256Node: File locking2115
257Node: Regexp selection2756
258Node: Output control3307
259Node: Search scope selection4300
260Node: Mailbox type selection4541
261Node: Examples4862
262Node: Bugs5681
263Node: To Vicky6089
264
265End Tag Table
266