killing and scoring

2002-02-13 Thread Andre Berger

Hi, I've just re-subscribed to this list!

I would like to use the same keystroke F12 to add senders to my
procmail killfile and score them to 0 in mutt.

My setup (below) tells procmail to source the addresses in
~/.procmail/spam, and add the message to  my spam/ Maildir:

#~/.procmailrc
FROM=`formail -xFrom: | sed -e 's/ *(.*)//; s/.*//; s/.*[:] *//'`
:0
* ? fgrep -qxis $FROM $HOME/.procmail/spam
{
  LOG=Spam from $FROM
  :0:
  spam/
}

I add to the killfile using F12:

#~/.muttrc
macro index F12 |grep ^From: | grep -v lists.debian | grep -v uzscd5 | grep -v 
berger.150 | grep -v andre.berger | sed -e 's/ *(.*)//; s/.*//; s/.*[:] *//'  
$HOME/.procmail/spam  echo Add sender to killfile\n;d\n kill sender
macro pager F12 |grep ^From: | grep -v lists.debian | grep -v uzscd5 | grep -v 
berger.150 | grep -v andre.berger | sed -e 's/ *(.*)//; s/.*//; s/.*[:] *//'  
$HOME/.procmail/spam  echo Add sender to killfile\n;d\n kill sender

Now, couldn't I extend the macro somehow to also add the sender to
~/.mutt.score, like

score '~f [EMAIL PROTECTED]' -
  ^^^sender

at the same time the address is added to ~/.procmail/spam?

-Andre




msg24489/pgp0.pgp
Description: PGP signature


Re: killing and scoring

2002-02-13 Thread David Champion

On 2002.02.13, in [EMAIL PROTECTED],
Andre Berger [EMAIL PROTECTED] wrote:
 
 My setup (below) tells procmail to source the addresses in
 ~/.procmail/spam, and add the message to  my spam/ Maildir:

Looks like you have a file (~/.procmail/spam) containing e-mail
addresses of people you want to block. So...


 Now, couldn't I extend the macro somehow to also add the sender to
 ~/.mutt.score, like
 
 score '~f [EMAIL PROTECTED]' -
   ^^^sender
 
 at the same time the address is added to ~/.procmail/spam?

... I'd create a script like this:
$ cat muttscore.sh
#!/bin/sh
cat $HOME/.procmail/spam | while read addr; do
echo score '~f $addr' -
done

... and source that from your muttrc:
source muttscore.sh|

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago
 Colons and slashes and dots, oh my!



Re: killing and scoring

2002-02-13 Thread Andre Berger

* David Champion [EMAIL PROTECTED], 2002-02-13 14:11 -0500:
 On 2002.02.13, in [EMAIL PROTECTED],
   Andre Berger [EMAIL PROTECTED] wrote:
  
  My setup (below) tells procmail to source the addresses in
  ~/.procmail/spam, and add the message to  my spam/ Maildir:
 
 Looks like you have a file (~/.procmail/spam) containing e-mail
 addresses of people you want to block. So...

Right

  Now, couldn't I extend the macro somehow to also add the sender to
  ~/.mutt.score, like
  
  score '~f [EMAIL PROTECTED]' -
^^^sender
  
  at the same time the address is added to ~/.procmail/spam?
 
 ... I'd create a script like this:
 $ cat muttscore.sh
 #!/bin/sh
 cat $HOME/.procmail/spam | while read addr; do
   echo score '~f $addr' -
 done
 
 ... and source that from your muttrc:
 source muttscore.sh|

Perfect!

Thank you very much

-Andre




msg24493/pgp0.pgp
Description: PGP signature