On Tue, May 02, 2006 at 05:22:34PM -0700, Christopher Nelson wrote:
> On Wed, May 03, 2006 at 09:34:19AM +0930, David Purton wrote:
> <snip>
> > I ended up using fgrep, which if I had read the grep manual I would have
> > found does what I want (Blush).
> >
> > This works well:
> >
> > # subject kill file
> > SUBJECT=`formail -zxSubject:`
> > :0:
> > * ? fgrep -qx "$SUBJECT" $HOME/.mutt.killfile
> > caughtspam
>
> Just out of curiosity (I'm sure this is in the manual, but a cursory
> glimpse didn't find it), what command are you using from mutt to dump
> the subject to ~/.mutt.killfile ?
>
I have macros in my ~/.muttrc
macro index \eK "<enter-command>unset wait_key\n|formail -zxSubject: >> $HOME/.mutt.killfile\n<enter-command>set wait_key\n"
macro pager \eK "<enter-command>unset wait_key\n|formail -zxSubject: >> $HOME/.mutt.killfile\n<enter-command>set wait_key\n"
Then I can just press <esc>K n either index or pager mode to append the
subject to the killfile.
There might be a better way to do it, but this works.
cheers
dc
--
David Purton
dcpurton@chariot.net.au
For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
2 Chronicles 16:9a
Attachment:
signature.asc
Description: Digital signature