procmail
[Top] [All Lists]

Re: "a" or "A" flag

1997-06-30 17:42:00

Thanks to all for the helpful pointers.

On Sun, 29 Jun 1997 15:25:17 +0300 (EET DST),
era eriksson <era(_at_)iki(_dot_)fi> writes:

[...]

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

     :0
     /dev/null
}
What is fundamentally unclear to me is the utility of generate a
carbon copy only to immediately send it to /dev/null

Just being anally redundant.  I didn't include the whole .procmailrc
for brevity's sake (and to avoid exposing my feeble mind to the whole 
world), but there is other stuff in there, too.  Much of this novice's 
first pass(es) on the .procmailrc were to test and to see for myself
how various options work.   Basically, the thought of sinking anything
to /dev/null caused me such anxiety that I decided to save everything
first, but also wanted to see for myself that sending it to the bit
bucket was ok too.  I run mailstat on the daily log, and derive some
comfort from the visual check that everything adds up and that nothing
has disappeared unintentionally.  (Just so my foot isn't inserted any
further into my mouth, my concern wasn't with the program behaving,
but simply my implementation.)  ;-)   Did I mention that a form of the
backup recipe from the man pages is done first?  Yeah really.

Anyway, the SPAM file is now a good source of info for creating a bozo
filter.  But I guess it *is* time to start cleaning up some of the rest
of this needless mess.

 
And also on Sun, 29 Jun 1997 09:37:52 -0400,
Stan Ryckman <stanr(_at_)sunspot(_dot_)tiac(_dot_)net> writes:
 
[...]

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

OK, why use the a (or A) flag at all here?  Instead, just drop the
"c" flags, making those delivering recipes: 
        :0:
        * ^Subject:.*(\$\$+|!!+)
        SPAM

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

Or even combine them all:
        :0 D:
        * ^Subject:.*(\$\$|!!|MONEY|FAST|FREE)
        SPAM
(I dropped the "+" since any match to "!!!" also matches "!!", e.g.)

You are right.  Although the redundancy made me feel better, it is
completely unnecessary.  And correct also on the regexp.

[...]

I want to change these to something like:

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

       :0 a
       /dev/null

Again, drop the "c" flag and the final recipe.  (If the intent
is to log the whole subject line, I think you'll also need a .*
on the end of the \/ line.)

Right again.

Hope that helps, 

It does.  Thanks again to all.  Now I'll get to work.

 - 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>