Re: Maildir format (was Re: [Nolug] mailutils)

From: Joey Kelly <joey_at_joeykelly.net>
Date: Fri, 18 Jul 2003 20:06:04 +0000
Message-Id: <200307190102.h6J12h010782@vkh.joeykelly.net>

Thou spake:

<snip>

>Second, the maildir format is friendlier to to Unix.
>
>For instance, on of the most flexible constructs in Unix is:
>
> find [dir] -type f | xargs [command]
>
>I use this on my maildirs all the time. Let's say I know I have old
>email somewhere from an fred@example.com about a payment he is
>sending me. With all the messages in one file. I have to load the
>file up in less and search for each instance of his address.
>
>With maildir format I can quickly zero in on only the messages from
>fred@example.com:
>
> find maildir -type f | \
> xargs grep -l '^From:.*fred@example.com' | \
> xargs grep -il 'payment' | xargs less
>
>This shows me only the messages in any of my folders from
>fred@example.com containing the word "payment". (Using text indexer
>would make this even better.)
>

There are utilities available to grep mail (SuSE offers one, I think the
package is called just that: "grepmail"). I'm assuming that it does mbox,
since that's SuSE's default.

-- 
Joey Kelly
< Minister of the Gospel | Computer Networking Consultant >
http://joeykelly.net
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/18/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST