On Mon, Dec 10, 2001 at 08:04:17PM +0100, Peter Poeml wrote:

> 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)

I'm not familiar with the <( construct.  What shell are you using?

> 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...

If your grepmail thing above works, then I would think that appending
"| xargs cat" to your egrep line and using that in place of grepmail
would also work:

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

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to