nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Selecting messages with a range of Spam scores


From: norm
Subject: Re: [Nmh-workers] Selecting messages with a range of Spam scores
Date: Sat, 21 Feb 2015 07:22:25 -0800

David Levine <address@hidden> writes:
>Norm wrote:
>
>> But the best way to get the message numbers having such a component,
>> WITH the corresponding contents of the component is not obvious to
>> me.
>
>Some variation of (assuming bash and GNU grep):
>
>msgs=last:45
>for i in $(pick $msgs --X-Spam-Status score=); do
>[ $i -ne 0 ] && \
>grep --with-filename --ignore-case ^X-Spam-Status $(mhpath $i)
>done

Thank you very much.

Looks like that will do it, if I add '--max-count=1' to the grep arguments (in
case the message body contains any lines starting with X-Spam-Status) and
provided that the relevant component is not multi-lined. I don't think that
that component is ever multi-lined.

Your reply strong suggests that there is presently no nmh way of extracting
the content of a component, taking account of multi-lined , MIME stuff, etc.

Again, thank you most kindly.



    Norman Shapiro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]