procmail
[Top] [All Lists]

Re: formail but WITHOUT updating unseen sequences?

1997-12-15 17:54:56

After seeing reference to the MH environment variable (which I had
never seen before) in Chris Mikkelson's message, I'd like to rephrase
the recipe I gave as follows:

First, create a file named "context.burst" in your Mail directory that
just contains the line:

        mh-sequences:

Then, use the following recipe:

        :0
        * ^From:(_dot_)*HVML(_at_)somewhere(_dot_)net
        {
            # You may want to set LOGABSTRACT to "no", either here, or
            # after the recipe that delivers to the folder, depending
            # on what sort of logging information you want to see.

            # Keep another procmail process from delivering and bursting
            # at the same time as this one.
            LOCKFILE = $HOME/Mail/HVMLIn.lock

            # deliver the message to the MH folder
            :0 c
            $HOME/Mail/HVMLIn/.

            # Extract the message number that procmail used
            :0
            * LASTFOLDER ?? ()\/[0-9]+$
            { }

            # Keep burst from changing the current folder or current message.
            MHCONTEXT = $HOME/Mail/context.burst

            # Brust the message.  I like to call burst with the "-inplace"
            # flag, but you'll want to try it out by hand, as if the digest
            # has info after the last message delimeter, it'll be lost.
            # You could work around that by prefacing this all with a body
            # filter that added another delimiter to the bottom of the
            # message, but that's gross and should be avoided if not needed.
            :0 wi
            |burst -inplace -quiet +HVMLIn $MATCH

            # The global lockfile will automatically be removed when
            # procmail exits.
        }

One process, and it doesn't modify MH's idea of the current folder or
current message inside the folder.

Philip Guenther