On Sun, Aug 18, 2002 at 06:00:11PM +0300, Jussi Ekholm wrote......
> 
> I press 'S' on a spam, which adds the From-header to this file formail
> goes through everytime mail comes in, and if the address can be found
> from this file, the mail gets /dev/nulled. It also adds a
> "blacklist_from foo@bar" entry in ~/.spamassassin/user_prefs. And then
> it moves the mail to spam folder. 
> 
> Here's the macro:
> 
>    macro pager S |~/.mutt/addspam.sh<enter>s="spam\n"
> 
> And the 'addspam.sh' looks like this:
> 
> [...]
> 
> #!/bin/sh
> #
> # $Id: addspam.sh,v 1.5 2002/08/11 07:48:09 ekhowl Exp $
> 
> SPAMASSASSINFILE="/home/ekhowl/.spamassassin/user_prefs"
> SPAMMERSFILE="/home/ekhowl/.procmail/spammers"
>

This looks like a pretty nifty solution.  I was going to give it a try,
but realized I don't know what you have for a recipe in
.procmail/spammers.  I'm not quite intuitive or advanced enough in this
stuff to guess the contents of .procmail/spammers, so would you mind
sharing?  I'd like to give your addspam script a try.

Many thanks, Kevin

> for x in `awk '{if ( $1 == "From:") { for (x = 1 ; x <= NF ;
> x++) { if ($x ~ /[^ ]*@[^ ]*/) { gsub("<|>", "", $x) ; print $x } }
> }}'`
> do
> echo $x >> $SPAMMERSFILE
> echo "blacklist_from $x" >> $SPAMASSASSINFILE
> done
> 
> [...]

-- 
Kevin Coyner
mailto: [EMAIL PROTECTED]
GnuPG key: 1024D/8CE11941

Attachment: msg30339/pgp00000.pgp
Description: PGP signature

Reply via email to