mboxgrep/doc/mboxgrep.1

144 lines
3.7 KiB
Groff
Raw Normal View History

.TH MBOXGREP 1 "23 September 2024"
.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 .
.PP
.B mboxgrep
scans a
.I MAILBOX
and displays messages matching
.I PATTERN.
.PP
If a mailbox name is ommited, or a single dash (-) is given instead,
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.
.IP "-o, --output=MAILBOX"
Suppress normal output and write messages to destination MAILBOX instead.
.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.
.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
.TP
\(bu
Re-mail to George messages that mention his name:
.PP
mboxgrep --pipe="/usr/lib/sendmail george" --ignore-case george ~/Mail/*
.TP
\(bu
Display all messages contained in folder ~/Mail/incoming, except those
that appear to originate from AOL:
.PP
mboxgrep -v 'Received:.*aol\\.com' ~/Mail/incoming
.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
.SH BUGS
Report them to address below.
.SH SEE ALSO
grep(1),
regex(7),
perlre(1),
mbox(5),
RFC 2822,
RFC 4155
.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.
.SH HOMEPAGE
https://www.mboxgrep.org/
.SH GIT
https://git.datatipp.se/dspiljar/mboxgrep
.PP
https://github.com/dspiljar/mboxgrep
.SH AUTHOR
Daniel Spiljar <dspiljar@datatipp.se>