NAME
takemail - walk through mailboxes and grep something
SYNOPSIS
takemail [--outbox][--outdir][--header][--nheader] [--verbose][--werr][--help] mailbox/mailbox-dir
DESCRIPTION
Dump mails applying to regular expressions either to stdout or into a newly created mailbox.
Options:
- --outbox FILE
-
(or
-c
) Create a new mailbox FILE and write the found messages into it. If omitted output goes to stdout. - --outdir DIR
-
Nothing yet.
- --header HEADER-FIELD=REGEX
-
Only find messages whose HEADER-FIELD(s) conform to REGEX. REGEX are standard Perl regular expresses without the leading and trailing slash '/'. Multiple key=value pairs can be given by separating them with whitespaces. Example:
takemail --header subject=[Hh]ello from=peter\|john ~/Mail
Care must be taken on special shell characters, especially those for piping. That means, '|' etc. probably needs to be escaped with a backslash '\'.
- --nheader HEADER-FIELD=REGEX
-
Only find messages whose HEADER-FIELD(s) do not conform to REGEX. Same usage as --header.
- --split HEADER-FIELD=NUM
-
(or
-s
) Create new mailboxes in --outdir (or $HOME if not given) with all those mails that have the same string in HEADER-FIELD but only if there are more than NUM of those. The following example will split the mailbox ~/received on from-lines and only copying a mail if there are at least 4 others from the same sender into ~/splitted. Each new mailbox will have the value of the from-line in the mail-header as filename:takemail --outdir ~/splitted --split from=5 ~/received
- --verbose
-
(or
-v
) Additionally print what is done to stderr. - --werr
-
Nothing yet.
- --help
-
(or
-?
) Print a short summary of options.
AUTHOR
Tassilo v. Parseval (tassilo.parseval@post.rwth-aachen.de).
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
VERSION
This code is beta, version 1.322