Re: mutt in command-line mode
* Roy S. Rapoport <mutt-users@xxxxxxxxxxxxxxxxx> [06-24-04 14:19]:
> I keep weekly archives of all my incoming mail.
> Occasionally I have need to find mail from a given user.
>
> Today, the process is:
> A) for file in `grep $username *.archive | sed 's/:.*//' | sort -u`; do
> cat $file >>! /tmp/someFile
> done
>
> B) Invoke mutt on /tmp/someFile and do 'l ~f $username'
>
> If I could manipulate mutt from the command-line, I could do some sort of
> for file in `grep $username *.archive | sed 's/:.*//' | sort -u`; do
> mutt 'T ~f $username' ';s /tmp/JusMessagesFromUsername' $file
Yes, replace all that conglomeration above with two packages, grepmail
and grepm
http://grepmail.sourceforge.net
http://www.barsnick.net/sw/grepm.html
to find all the files "from" user "abcxy@xxxxxxx" in files "file1,
file2, file3""
grepm -iRY ^From abcxy /path/file1 /path/file2 /path/file3
results: mutt will open in index mode with the subject messages listed.
I use it frequently.
--
Patrick Shanahan Registered Linux User #207535
http://wahoo.no-ip.org @ http://counter.li.org
HOG # US1244711 Photo Album: http://wahoo.no-ip.org/photos