procmail
[Top] [All Lists]

RE: Reprocessing mail files

2000-04-24 10:36:53
From: David W. Tamkin [mailto:dattier(_at_)ripco(_dot_)com]

Here's a suggestion: since mail you are reprocessing doesn't
need to be checked for spam, put a pair of braces around all your
spam-checking recipes like this:

  :0
  * legit ?? yes
  {
    # all spam checking code goes here
  }

and use

  formail -s procmail legit=yes < mailfile

I find this quite interesting, but it raised a couple of questions for
me.  As David knows, I myself have very recently started using "label"
variables to mark sections, as well as individual recipes, for bulk
processing further down in the rc-file.  But my mechanism was slightly
different than this.  (And I did this so that I could easily add X-header
identifiers and log entries telling me which recipes from a certain set
were being invoked.)  But anyway, I'm left a bit confused by the
suggestion here.

Reason 1 for my confusion is that the formail statement seems to me
to be saying, "If legit=yes, run what's inside the braces.  But I
thought the point was *not* to run the spam recipes again - not to
selectively run only them!  Am I misunderstanding something, or
was your labeling just done hurriedly, David?

Reason 2 I'm confused is that if you say

        :0
        * legit ?? yes
        {
          stuff
        }

won't "stuff" only run when legit=yes?  I thought you were suggesting
that he make a *permanent* change to his rc-file.  This would mean
that the spam stuff would never be run unless he sets legit=yes
somewhere or does the formail statement -------------- OH.  I THINK
I JUST GOT IT.  (Sorry for shouting.)

Duh, silly me.  If David meant it as he wrote it except for an
inadvertently ommitted bang (exclamation mark) for "not", then
it all comes rushing in to make sense in my brain.  Okay: I'll
presume he meant:

        :0
        * ! legit ?? yes
        {
          stuff
        }


Now I'm tempted to abandon this mail; but on second thought, I think
some others might have been as tacitly confused as was I, so I'll send
it anyway.


| Question 3: Can output be forced to [a different DEFAULT when running
| formail?]

  formail -s procmail legit=yes DEFAULT=newfilename < mailfile

Cool beans.  Thanks.

--
Dallman Ross
U.S. Voicemail/FAX: +1 (415) 680-2388
Residence Telephone: +49 (0) 6122 / 98 04 46
Cellular Telephone: +49 (0) 177 / 515 34 69
<dman(_at_)netcom(_dot_)com> ? <dman(_at_)nomotek(_dot_)com> ? 
<dman(_at_)oxon(_dot_)de>

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