procmail
[Top] [All Lists]

"a" or "A" flag

1997-06-28 09:27:00
Hello all -

I've been using procmail for about 6 mos and lurking here getting tips
and info.  Thanks.  Now it's time to work on my .procmailrc file and
I'm unclear on the "a" and "A" flags.

Some quick background.  At this time procmail is used as a SPAM filter,
because that was the pressing need.  (It will soon be used for sorting
as well but that's another story.)  There are recipes that catch
everything known to be good and then recipes that test for SPAM.  Some
of these filter on (From|Reply|Sender|Received) and others on obvious
Subject: lines.  I send SPAM to a file using the "c" flag, then to
/dev/null.  This is redundant, but I am being overly cautious until
certain everything is ok.  My recipes are not aggressive - I don't want
to cut off all communication with the outside world, only that which is
obviously of no interest to me.

I have some recipes like the following (which have apparently worked
fine) but want to do some things like logging $MATCH to get more detail.

# zap obvious Subject lines

        :0 c: 
        * ^Subject:.*(\$\$+|!!+)
        SPAM

        :0 a
        /dev/null

        :0 Dc: 
        * ^Subject:.*(MONEY|FAST|FREE)
        SPAM

        :0 a 
        /dev/null

While reading stuff from this list and the man pages, I began to
question whether the "a" flags should be "A".  The man pages read to 
me as though the "a" flag depends on the *two* preceding recipes, but 
in the cases above only one exists.  Am I reading this correctly?

I want to change these to something like:

        :0 Dc:
        * \/^Subject:.*(MONEY|FAST|FREE)
        {
                LOG="$MATCH
        "
                :0:
                SPAM
        }

        :0 a
        /dev/null

I don't think either "a" or "A" is needed in the nested block, but
which one is correct for the final action?  Or better yet, what would
they each do?

Thanks.

 - Don

____________________________
 Donald E. Hammond
 deh(_at_)openix(_dot_)com  (preferred)
 deh(_at_)ripco(_dot_)com
 103750(_dot_)645(_at_)compuserve(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>