procmail
[Top] [All Lists]

Re: splitting digests, catching duplicates

1996-12-06 02:48:49
The following adds a new header to the headers of the digest, not
to any of the messages within the digest.

    :0fh      # insert the newsgroup header if the subject matches
    | formail -I"Newsgroups: $NEWSGROUP"


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

}


Could it be that the "formail +1" is dropping the header line we  
have just added?  Is there a way to pass the variable to  
'proc-filter'?

The +1 says to skip the first message (which I presume to be that
of the digest itself).  So, yes, the Newsgroup: header is being
ignored by the "proc-filter" script.

Yes, you can pass "proc-filter" an argument:

    procmail -m /usr/local/bin/proc-filter $NEWSGROUP

Then, in the recipe file:

    NEWSGROUP=$1                # just like "sh"

G'luck
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com>      http://reality.sgi.com/aks