procmail
[Top] [All Lists]

Re: Loop within ~/.procmailrc possible?

2003-01-09 13:20:12
Ralph =?iso-8859-1?Q?M=FCller?= <rmue(_at_)gmx(_dot_)de> schrieb:

is it possible to make a loop _within_ the ~/.procmailrc ?
(I mean no "mail-loop".)

I mean something like

  for i = 1 to 10
    :0 fhw
    ^()\/[^:]*:

You need an asterisk to start a condition line.

    | formail -I "$MATCH"
  next i

Aim: to delete the entire mailheader, and make/create a new one (in a
second step).

The only recursion inside procmail is via an INCLUDERC.  Look at
the list archives, and try a search on "recursive INCLUDERC", and
I think you'll come up with lots of samples.

That said, you don't need this at all to delete the mail header,
however.  You could simply do:

        :0fw
        | formail -I ""

Or to simply save mail without headers,

        :0b:
        guillotined

However, if you merely want to rewrite headers, you don't need to
delete the old one first, anyway, either.  Read the formail man
page again.

-- 
dman


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

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