GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MBOXGREP(1) FreeBSD General Commands Manual MBOXGREP(1)

mboxgrep - displays email messages matching a pattern

mboxgrep [OPTIONS] PATTERN [MAILBOX]

This manual page refers to mboxgrep version 0.7.13.

mboxgrep scans a MAILBOX and displays messages matching PATTERN.

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 mboxgrep process from standard input.

mboxgrep understands POSIX regular expressions, as well as Perl compatible regular expressions (if enabled at compile time). MAILBOX can be either a:

mbox folder (either plain or compressed)
MH folder
Gnus nnmh or nnml folder
qmail-style maildir folder

Display a help screen and exit.
Display version and copyright information and exit.
Descend into directories recursively.
PATTERN is an extended regular expression. This is default.
PATTERN is a basic regular expression.
PATTERN is a Perl regular expression. Works only if enabled at compile time.
Use PATTERN as a regular expression.
Ignore case distinctions.
Select messages which don't match PATTERN.
Match PATTERN against message headers.
Match PATTERN against message body.
Select file locking METHOD. METHOD is `fcntl', `flock', or `none'.
Do not lock files. This option is meaningful only if a mbox folder (see below) is scanned.
Suppress normal output and print a count of matching messages.
Suppress normal output and write messages to destination MAILBOX instead.
Pipe each found message to COMMAND
Suppress normal output and delete selected messages instead. Use with caution.
Ignore duplicate messages.
Select input and output mailbox TYPE. TYPE can be either `mbox' (default), `zmbox' (gzip compressed mbox), `bz2mbox' (bzip2 compressed mbox), `mh', `nnml', `nnmh' or `maildir'.
Suppress most error messages.
Print messages useful for debugging.

Search $MAIL for messages from Dirty Harry:

mboxgrep '^From:.*callahan@sanfranciscopolice\.org' $MAIL

Re-mail to George messages that mention his name:

mboxgrep --pipe="/usr/lib/sendmail george" --ignore-case george ~/Mail/*

Display all messages contained in folder ~/Mail/incoming, except those that appear to originate from AOL:

mboxgrep -v 'Received:.*aol\.com' ~/Mail/incoming

Do a case-insensitive scan of ~/Mail/incoming for messages with subject ``Weekly News'' and write them to folder ~/Mail/archive:

mboxgrep -o ~/Mail/archive -H -i '^Subject: Weekly News' ~/Mail/incoming

Count all messages stored in folder spam, ignoring duplicates:

mboxgrep -nd -c . spam

Report them to address below.

grep(1), regex(7), perlre(1), mbox(5), RFC 2822, RFC 4155

Mboxgrep is dedicated in loving memory of Vicky, my cat who died of tumor on Sep 12, 2002.

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.

https://www.mboxgrep.org/

https://git.datatipp.se/dspiljar/mboxgrep

https://github.com/dspiljar/mboxgrep

Daniel Spiljar <dspiljar@datatipp.se>

23 September 2024

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.