procmail
[Top] [All Lists]

Re: Reverting back to a simple blacklist

2004-11-07 22:46:37
Thank you so much for replying.  Now nothing is sent to trash.  -x means
match whole line so does it only match if the whole line in
$HOME/.killfile matches the whole line in From: ? because I am only
matching the domain name.  So, does the domain name need to be in the
From: line or does the domain name need to be the 'only' thing in the
From: line?  so what I have now is:

BLACKLIST=$HOME/.killfile
:0
*$ ? test -s $BLACKLIST
* ? (formail -x From: | fgrep -iqxf $BLACKLIST)
trash

I am trying it now w/o the ':' after the From.

On Sun, 2004-11-07 at 16:51, S.A. Birl wrote:
On Nov 5, Poohba 
(nospam-poohba(_at_)blkpoohba(_dot_)dyndns(_dot_)org(_dot_)ns) typed:

poohba:  I figured I would create a script to read from my blacklist mail 
folder
poohba:  and get the 'From:' email addresses and move them to my
poohba:  /home/user/.killfile.  So now I need to get my old blacklist working
poohba:  again.  I've tried the following but too much mail goes to the trash
poohba:  that shouldn't.  I am glad I have it going to trash instead of 
/dev/null
poohba:  but how do I get this to only put in the trash those emails that 
have a
poohba:  From: header or Reply-To: header that matches whats in the 
$BLACKLIST ?
poohba:  I had 'Reply-To:' in the recipe also but took it out.
poohba:
poohba:  BLACKLIST=$HOME/.killfile
poohba:  :0
poohba:  *$ ? test -s $BLACKLIST
poohba:  * ? (formail -x From: -x Received: | fgrep -iqf $BLACKLIST)
poohba:  trash



I posted a similar problem back in mid-Oct.  I eventually tried different
flags, and want to suggest that you put a -x flag in fgrep.  You may find
that this will help.

Birl



 Archives   http://www.xray.mpe.mpg.de/mailing-lists/procmail/

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail