From owner-freebsd-questions Tue Jan 15 20:15:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from relay04.roc.frontiernet.net (alteon01e.roc.frontiernet.net [66.133.130.235]) by hub.freebsd.org (Postfix) with SMTP id 31B8637B400 for ; Tue, 15 Jan 2002 20:15:17 -0800 (PST) Received: (qmail 11190 invoked from network); 16 Jan 2002 04:15:11 -0000 Received: from unknown (HELO blacklamb.mykitchentable.net) ([207.173.227.80]) (envelope-sender ) by relay04.roc.frontiernet.net (qmail-ldap-1.03) with SMTP for ; 16 Jan 2002 04:15:11 -0000 Received: from bigdaddy (bigdaddy [192.168.1.3]) by blacklamb.mykitchentable.net (Postfix) with SMTP id AED30EE651; Tue, 15 Jan 2002 20:15:09 -0800 (PST) Message-ID: <005b01c19e44$62e64f30$0301a8c0@bigdaddy> From: "Drew Tomlinson" To: "Steve Wingate" Cc: References: <000d01c19a03$ac695c50$c42a6ba5@lc.ca.gov> <20020110105559.635ab0e3.steve@velosystems.net> Subject: Re: OT: SpamBouncer Date: Tue, 15 Jan 2002 20:15:09 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Steve Wingate" To: "Drew Tomlinson" Cc: 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