Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2002 20:15:09 -0800
From:      "Drew Tomlinson" <drew@mykitchentable.net>
To:        "Steve Wingate" <steve@velosystems.net>
Cc:        <questions@freebsd.org>
Subject:   Re: OT: SpamBouncer
Message-ID:  <005b01c19e44$62e64f30$0301a8c0@bigdaddy>
References:  <000d01c19a03$ac695c50$c42a6ba5@lc.ca.gov> <20020110105559.635ab0e3.steve@velosystems.net>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----
From: "Steve Wingate" <steve@velosystems.net>
To: "Drew Tomlinson" <drew@mykitchentable.net>
Cc: <questions@freebsd.org>
Sent: Thursday, January 10, 2002 10:55 AM
Subject: Re: OT: SpamBouncer


> > Is there a file where I can add email addresses to automatically
filter
> > them as spam?  Basically, the opposite of the .nobounce file.  For
> > example, I get mail from macys.com that passes the filter because
it
> > sees it as an admin message and gets sent to my inbox.  I would
like to
> > put this email address in a file to have it filtered as spam.
> >
> I use procmail to do this. In my .procmailrc file I have entries
like this:
>
> # where to put spam
> SPAM = $MAILDIR/spam
>
> # people we *never* want to get mail from
> SPAMMERS = $HOME/.procmail/spammers
>
> # tell procmail what to do with mail from people who are known to be
> # spammers
> :0:
> * ? ($FORMAIL -x From: -x Sender: -x Reply-To: -x Return-Path: -x
To: | $FGREP -isf $SPAMMERS)
>$SPAM

I am trying to implement your solution here.  I have the following in
my .procmailrc file:
# where to put spam
BLOCKFOLDER = $MAILDIR/.Spam/new
# people we *never* want to get mail from
BLOCKLIST = $HOME/.blocked
FGREP = /usr/bin/fgrep
FORMAIL = /usr/local/bin/formail
# Actual recipe to block mail contained in our blocklist
:0
* ? ($FORMAIL -x From: -x Sender: -x Reply-To: -x Return-Path: -x To:
| $FGREP -isf $BLOCKLIST)
$BLOCKFOLDER

Right now I have a .blocked file that is empty.  However, *All* mail
is getting delivered to $BLOCKFOLDER.  Why?  Here is output of my
procmail log with VERBOSE=YES:

Tue Jan 15 19:56:46 PST 2002
procmail: [3599] Tue Jan 15 19:56:46 2002
procmail: Assigning "BLOCKFOLDER=/home/account/Maildir//.Spam/new"
procmail: Assigning "BLOCKLIST=/home/account/.blocked"
procmail: Assigning "FGREP=/usr/bin/fgrep"
procmail: Assigning "FORMAIL=/usr/local/bin/formail"
procmail: Executing " ($FORMAIL -x From: -x Sender: -x Reply-To: -x
Return-Path: -x To: | $FGREP -isf $BLOCKLIST)"
procmail: Match on " ($FORMAIL -x From: -x Sender: -x Reply-To: -x
Return-Path: -x To: | $FGREP -isf $BLOCKLIST)"
procmail: Assigning
"LASTFOLDER=/home/account/Maildir//.Spam/new/msg.Z6rL"
procmail: Opening "/home/account/Maildir//.Spam/new/msg.Z6rL"
procmail: Acquiring kernel-lock
procmail: Notified comsat:
"account@0:/home/account/Maildir//.Spam/new/msg.Z6rL"
From drew@mykitchentable.net  Tue Jan 15 19:56:46 2002
 Subject: Test
  Folder: /home/account/Maildir//.Spam/new/msg.Z6rL
756

What am I missing?

Thanks for your help with both procmail and postfix!!!

Drew




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005b01c19e44$62e64f30$0301a8c0>