On Thu, Dec 06, 2001 at 05:06:43PM -0500, Eric Kidd wrote:
> 
> Let's try a test.
> 
> Ideally, I'd like to search three separate folders for all mail to or
> from [EMAIL PROTECTED] or [EMAIL PROTECTED] during September 2000, display all
> matching messages in a list view, and then search *those* for a number
> of different strings in the body.  Bonus points if I can save the query
> or have it automatically update if new, matching mail arrives.  (This is
> a real test case from a recent problem I had.)
>
> How much of this can I actually do in mutt?  Hacks and workarounds are
> OK, but I'd like to know the (1) limitations and (2) actual keystrokes
> so I can try it before posting my apology.

As mentioned before, grepmail can jump in because mutt works on single
mail boxes. Now I was curious and figured out the command for your real
example:

mutt -f <(grepmail -huqd "between 2001-09-01 and 2001-10-01" \
        "^From.*frob@(foo|bar).net" mbox1 mbox2 mbox3)

Sadly grepmail only works on mbox mail boxes, not with mails stored in
maildirs. You should be able to at least gather the matching mail files
with find:

egrep -l "^From.*frob@(foo|bar).net" {maildir1,maildir2,maildir3}/*/* \
        | xargs grep -l "Sep 2000"

But I'm wondering how to feed that into mutt...

Peter

-- 
VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice day...

Reply via email to