procmail
[Top] [All Lists]

Capturing spamc output to var

2004-02-14 18:18:25
On Fri, Feb 13, 2004 at 04:47:42PM -0800, Bart Schaefer wrote:

If you rewrite it this way ...

Here's what I've got in place now for spamc:

       :0  # 040215 () this is an assignment recipe, not a delivering one
        * $ $GO^0    REDELIVER  ??  $TRUE
        * $ $GO^0  ! TEST       ??  $TRUE
        SA_OUT=| /users/zconcept/bin/spamc -c


       :0:  # 040215 () check for possible spamc failure
        * SA_OUT  ?? ^^0/0^^
        spamc_failure

       :0  # 040215 () find score for non-negative results
        * SA_OUT  ??  ^^\/[^-/]+
        {
            SA_SCORE = $MATCH
            :0  # 040215 () if SA score warrants, tag as spam
             * SA_OUT ?? ()\/[0-9.]+^^
             * $  $SA_SCORE^0
             * $     $SMALL^0
             * $    -$MATCH^0
             { RX = SpamAssassin:$SA_OUT }
        }

       logtext = "SA Score was $SA_OUT"
       :0  # 040215 () show insufficient spam scores for logs
        * $  RX  ??  $FALSE
        { LOG = "$angle_L $logtext $angle_R" }

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail