2024-09-27 21:41:15 +00:00
|
|
|
.TH MBOXGREP 1 "27 September 2024"
|
2018-10-04 19:28:05 +00:00
|
|
|
.SH NAME
|
|
|
|
mboxgrep \- displays email messages matching a pattern
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mboxgrep
|
|
|
|
.RI [ OPTIONS ]
|
|
|
|
.RI PATTERN
|
|
|
|
.RI [ MAILBOX ]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
This manual page refers to
|
|
|
|
.B mboxgrep
|
|
|
|
version
|
2024-09-23 19:34:04 +00:00
|
|
|
.BR 0.7.13 .
|
2018-10-04 19:28:05 +00:00
|
|
|
.PP
|
|
|
|
.B mboxgrep
|
|
|
|
scans a
|
|
|
|
.I MAILBOX
|
|
|
|
and displays messages matching
|
|
|
|
.I PATTERN.
|
|
|
|
.PP
|
2024-09-27 21:41:15 +00:00
|
|
|
If a mailbox name is omitted, or a single dash (-) is given instead,
|
2018-10-04 19:28:05 +00:00
|
|
|
it reads from standard input.
|
|
|
|
It can read mbox folders or output from another
|
|
|
|
.B mboxgrep
|
|
|
|
process from standard input.
|
|
|
|
.PP
|
|
|
|
.B mboxgrep
|
|
|
|
understands POSIX regular expressions, as well as Perl compatible regular
|
|
|
|
expressions (if enabled at compile time).
|
|
|
|
.I MAILBOX
|
|
|
|
can be either a:
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
mbox folder (either plain or compressed)
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
MH folder
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
Gnus nnmh or nnml folder
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
qmail-style maildir folder
|
|
|
|
.SH OPTIONS
|
|
|
|
.PP
|
|
|
|
.IP "-h, --help"
|
|
|
|
Display a help screen and exit.
|
|
|
|
.IP "-V, --version"
|
|
|
|
Display version and copyright information and exit.
|
|
|
|
.IP "-r, --recursive"
|
|
|
|
Descend into directories recursively.
|
|
|
|
.IP "-E, --extended-regexp"
|
|
|
|
PATTERN is an extended regular expression. This is default.
|
|
|
|
.IP "-G, --basic-regexp "
|
|
|
|
PATTERN is a basic regular expression.
|
|
|
|
.IP "-P, --perl-regexp"
|
|
|
|
PATTERN is a Perl regular expression. Works only if enabled at compile time.
|
|
|
|
.IP "-e, --regexp=PATTERN"
|
|
|
|
Use PATTERN as a regular expression.
|
|
|
|
.IP "-i, --ignore-case"
|
|
|
|
Ignore case distinctions.
|
|
|
|
.IP "-v, --invert-match"
|
|
|
|
Select messages which don't match PATTERN.
|
|
|
|
.IP "-H, --headers"
|
|
|
|
Match PATTERN against message headers.
|
|
|
|
.IP "-B, --body"
|
|
|
|
Match PATTERN against message body.
|
|
|
|
.IP "-l, --file-lock=METHOD"
|
|
|
|
Select file locking METHOD. METHOD is `fcntl', `flock', or `none'.
|
|
|
|
.IP "-nl, --no-file-lock"
|
|
|
|
Do not lock files. This option is meaningful only if a mbox folder (see below)
|
|
|
|
is scanned.
|
|
|
|
.IP "-c, --count"
|
|
|
|
Suppress normal output and print a count of matching messages.
|
2023-12-28 23:59:25 +00:00
|
|
|
.IP "-o, --output=MAILBOX"
|
|
|
|
Suppress normal output and write messages to destination MAILBOX instead.
|
2018-10-04 19:28:05 +00:00
|
|
|
.IP "-p, --pipe=COMMAND"
|
|
|
|
Pipe each found message to COMMAND
|
|
|
|
.IP "-d, --delete"
|
|
|
|
Suppress normal output and delete selected messages instead. Use with
|
|
|
|
caution.
|
|
|
|
.IP "-nd, --no-duplicates"
|
|
|
|
Ignore duplicate messages.
|
|
|
|
.IP "-m, --mailbox-format=TYPE"
|
|
|
|
Select input and output mailbox TYPE. TYPE can be either `mbox' (default),
|
2023-02-10 08:35:50 +00:00
|
|
|
`zmbox' (gzip compressed mbox), `bz2mbox' (bzip2 compressed mbox), `mh', `nnml',
|
|
|
|
`nnmh' or `maildir'.
|
2023-02-17 21:19:36 +00:00
|
|
|
.IP "-s, --no-messages"
|
|
|
|
Suppress most error messages.
|
|
|
|
.IP "--debug"
|
|
|
|
Print messages useful for debugging.
|
2018-10-04 19:28:05 +00:00
|
|
|
.SH EXAMPLES
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
Search $MAIL for messages from Dirty Harry:
|
|
|
|
.PP
|
2023-02-10 08:35:50 +00:00
|
|
|
mboxgrep '^From:.*callahan@sanfranciscopolice\\.org' $MAIL
|
2018-10-04 19:28:05 +00:00
|
|
|
.TP
|
|
|
|
\(bu
|
2024-09-23 10:59:51 +00:00
|
|
|
Re-mail to George messages that mention his name:
|
|
|
|
.PP
|
|
|
|
mboxgrep --pipe="/usr/lib/sendmail george" --ignore-case george ~/Mail/*
|
|
|
|
.TP
|
|
|
|
\(bu
|
2018-10-04 19:28:05 +00:00
|
|
|
Display all messages contained in folder ~/Mail/incoming, except those
|
|
|
|
that appear to originate from AOL:
|
|
|
|
.PP
|
|
|
|
mboxgrep -v 'Received:.*aol\\.com' ~/Mail/incoming
|
2024-09-23 10:59:51 +00:00
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
Do a case-insensitive scan of ~/Mail/incoming for messages with subject
|
|
|
|
``Weekly News'' and write them to folder ~/Mail/archive:
|
|
|
|
.PP
|
|
|
|
mboxgrep -o ~/Mail/archive -H -i '^Subject: Weekly News' ~/Mail/incoming
|
|
|
|
.TP
|
|
|
|
\(bu
|
|
|
|
Count all messages stored in folder spam, ignoring duplicates:
|
|
|
|
.PP
|
|
|
|
mboxgrep -nd -c . spam
|
2018-10-04 19:28:05 +00:00
|
|
|
.SH BUGS
|
|
|
|
Report them to address below.
|
|
|
|
.SH SEE ALSO
|
|
|
|
grep(1),
|
|
|
|
regex(7),
|
|
|
|
perlre(1),
|
|
|
|
mbox(5),
|
2024-09-23 10:59:51 +00:00
|
|
|
RFC 2822,
|
|
|
|
RFC 4155
|
2018-10-04 19:28:05 +00:00
|
|
|
.SH DEDICATION
|
|
|
|
Mboxgrep is dedicated in loving memory of Vicky, my cat who died of
|
|
|
|
tumor on Sep 12, 2002.
|
|
|
|
.PP
|
|
|
|
You haven't been long with us, but you gave us a lot of joy and all your
|
|
|
|
big heart that stopped ticking too early. I will never forget you. Sleep
|
|
|
|
well, little friend.
|
2024-09-23 10:59:51 +00:00
|
|
|
.SH HOMEPAGE
|
|
|
|
https://www.mboxgrep.org/
|
|
|
|
.SH GIT
|
|
|
|
https://git.datatipp.se/dspiljar/mboxgrep
|
|
|
|
.PP
|
|
|
|
https://github.com/dspiljar/mboxgrep
|
2018-10-04 19:28:05 +00:00
|
|
|
.SH AUTHOR
|
2024-09-23 10:59:51 +00:00
|
|
|
Daniel Spiljar <dspiljar@datatipp.se>
|