procmail
[Top] [All Lists]

Re: Can't get action | to work

2006-03-27 16:43:09
On Tue, Mar 28, 2006 at 12:30:41AM +0200, Dallman Ross wrote:

Whoops, I forgot your other condition.


     :0
     * ^Return-Path:(_dot_)*(_at_)hotmail
     * $ ^Subject:.*\/[^$WS].*
     {
         MAILDIR = spamtest
         LOGFILE = spam.log
         LOG     = "$TIME bounce address $MATCH $NL"  # assumes $NL was set
         DEFAULT = spamtest/gotcha
         SWITCHRC
     }

I'm going to try this one more time.  I didn't mean to
type "spamtest/" in the assignment of DEFAULT there.  (We've
already entered that dir via the MAILDIR invocation.)

Also, I think I was wrong earlier to say that you might get errors
due to a closed-early pipe.  I think that won't happen on
delivering pipes -- only on filtering (non-delivering) ones
that don't use the "i" flag.

Finally, I've now tested this thing.  We don't need
your $TIME, your bounce address (anyway, you'd captured
the Subject, not the bounce address!), or any special log
line this way:


      :0
      * ^Return-Path:(_dot_)*(_at_)hotmail
      * $ ^Subject:.*\/[^$WS].*
      {
          MAILDIR    = spamtest
          VERBOSE    = off
          OLDLOGFILE = "$LOGFILE"
          LOGFILE    = spam.log
          LOGFILE    = "$OLDLOGFILE"

          DEFAULT    = gotcha
          SWITCHRC
      }
  

Here's the log from a sample spam:

  From sample(_at_)hotmail(_dot_)com  Sat Aug  6 23:40:41 2005
   Subject: Dating site for sexoholics
    Folder: gotcha                                                           
1583

-----------
Dallman

____________________________________________________________
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