logo       

Re: limiting index by author: msg#00113

mail.mutt.mutt-ng.user

Subject: Re: limiting index by author

Hi,
Just for the record:
I did pretty much the same what Michael said. My solution looks like this:

,----[ macros.conf ]-
| macro index A |'~/bin/mutt_address.sh ~/temp/mutt_source.txt'\n:"source
| ~/temp/mutt_source.txt\n" "limit message view by selected author"
`----

with mutt_address.sh looking like this:

,----[ mutt_address.sh ]-
| #!/bin/sh
|
| FORM=`which formail`
| CAT=`which cat`
| ARGS="`cat`"
|
| OUTPUT=`echo "${ARGS}"|"${FORM}" -tzx "From:" | sed 's/.*<//;s/>//'`
|
| TEMP="$1"
| exec >"${TEMP}" || exit 1
|
| cat <<EOF
| push "<limit>~f \"${OUTPUT}\"<enter>"'
| EOF
`----

If you are wondering about the sed expression, I did not find a way using
formail to simply return the senders email address, instead it will
always extract the complete header field. Therefore I use sed to extract
only the part between the "<>" part.

Together with set wait_key=no it works pretty well.


regards,
Christian



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise