Re: Packaged version of killfile?
On Wed May 16, 2007 at 03:27:41 -0700, Paul Johnson wrote:
> >> This is a function of your MUA, most decent mail readers and all news
> >> readers worthy of being called such support highlight/kill by thread,
> >> usually in a single keystroke.
> >
> > I have to admit my ignorance then. I'm a keen mutt user, but I cannot
> > find that feature (!)
>
> As advanced as Mutt is, this is where Mutt really falls down. I ultimately
> ended up switching to kmail to get that feature.
OK here's a simple version.
In ~/.mutt-skx:
#
# .k = killfile messages with this subject.
#
macro index .k "<enter-command>unset wait_key\n|formail -zxSubject: >> $HOME/.procmail_killsubject\n<enter-command>set wait_key\n"
macro pager .k "<enter-command>unset wait_key\n|formail -zxSubject: >> $HOME/.procmail_killsubject\n<enter-command>set wait_key\n"
This binds ".k" to a command which extracts the subject of the current
message to the file ~/.procmail_killsubject.
Then in ~/.procmailrc I have this:
# Look for the subject.
SUBJECT=`formail -zxSubject:`
:0:
* ? test -s $HOME/.procmail_killsubject
* ? fgrep -qx "$SUBJECT" $HOME/.procmail_killsubject
killfile
This means that all future messages with a subject contained in the
file ~/.procmail_killsubject will be saved to the folder "killfile".
Similar process can be used to kill by MSGID, sender, etc.
Steve
--
Reply to: