procmail
[Top] [All Lists]

calling 'procmail' recursively

1996-12-16 21:16:46

I don't know if I am getting into dangerous ground here or not, but  
I couldn't find much about this in the man pages, so I just have to  
ask.

Anyway, I have this recipe here:

:0
* ^Subject: next-\/(announce|\
                    bugs|\
                    hardware|\
                    marketplace|\
                    misc|\
                    software|\
                    sysadmin)
{

        NEWSGROUP=comp.sys.next.$MATCH

        :0: proc-filter.lock
        |formail +1 -des \
         procmail -m /usr/local/bin/proc-filter $NEWSGROUP

}


that sends certain messages (Digests of the NeXT usenet groups) to  
a program called "proc-filter" which splits the digests into  
individual messages, checks for duplicates, and [currently] dumps  
the message to the $DEFAULT.

What I would _like_ to do, is have the messages be sent to  
"proc-filter", and when proc-filter is done with what it has to do,  
I would like it to send the individual messages that came from the  
digest _back_ to the top of the procmailrc, so processing can begin  
all over again (I can check for spammers, certain Subject lines I  
want to dump, etc).

I read through the man pages, but the closest I came to anything  
was the last sentence of 'man procmailrc' which reads:

     For really complicated processing you can even consider
     calling procmail recursively.

but gives no advice on doing so.

Is this a major no-no?  Am I about to rush in where angels fear to  
tread?  I don't see (in this example) where anything could cause an  
infinite loop, etc (although I see that as a possibility for some  
cases.)

What's the scoop?

Is it as easy as making the last part of "proc-filter"

:0: procmail-recusive-call.lock
|procmail

Nah, can't be that easy.

Thanks
TjL

--
Tj Luoma (luomat(_at_)peak(_dot_)org) / http://www.next.peak.org/~luomat
        
        *** I will be out of town from Dec 19th - Dec 31st ***

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