procmail
[Top] [All Lists]

Re: Splitting digests with procmail and formail

1996-08-15 14:35:48
    > Please excuse me if this question is an old one:  I want to use
    > procmail and formail to split mail digests into individual messages,
    > and I've got that working with:
    > 
    > :0:
    > * ^Subject: +foo
    > | formail +1 -ds >>$MAILDIR/foo
    > 
    > However, I would also like to take the first message in the digest and
    > put it back into my inbox (so I know what the digest looks like, and
    > that it has arrived).  Any ideas?

Try this:

    :0
    * ^Subject: *foo
    {
        # First split and file the mail
        :0c:foo.lock
        | formail +1 -ds >>foo

        # next, replace the digest with the first message
        # and then deliver normally
        :0f
        | formail -1 -ds

    }
    # Continue with normal delivery filtering, including dropping
    # the mail into $DEFAULT
    ...

_____________________________________________________________________
Alan Stebbens <stebbens(_at_)sgi(_dot_)com>      http://reality.sgi.com/stebbens

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