procmail
[Top] [All Lists]

Confused about locking

2009-10-10 06:10:25
How do you ensure correct locking on maildir folders? I
have three things accessing mine: procmail, mailx and
courier imap. Do they agree on some sort of convention
for locking?

I was particularly confused about this when recently
writing a procmail recipe to move any thread I reply
to on a list into a separate folder, and keep further
messages on that thread going to that folder:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:0: mypostrefs$LOCKEXT
* ^List-Id:.*<xorg-driver-ati\.lists\.x\.org>|\
  ^List-ID:.*<mythtv-users\.mythtv\.org>|\
  ^List-Id:.*<mythtv-dev\.mythtv\.org>|\
  ^List-Id:.*<openchrome-users\.openchrome\.org>\
  ^List-Id:.*<procmail.lists.RWTH-Aachen.de>
{
FIRSTOFTHREAD=`formail -x References -c | sed -e 's/[^<]*<//' -e 's/>.*//'` FIRSTOFTHREAD=${FIRSTOFTHREAD:-`formail -x Message-ID -c | sed -e 's/.*<//' -e 's/>.*//'`}

    :0
    * ^From:(_dot_)*lists(_at_)glidos(_dot_)net
    {
        :0c
        * ! ? grep "${FIRSTOFTHREAD}" mypostrefs
        | echo "${FIRSTOFTHREAD}" >> mypostrefs; \
{ echo move \(header References "${FIRSTOFTHREAD}"\) .Stuff.ListsMe; \ echo move \(header Message-ID "${FIRSTOFTHREAD}"\) .Stuff.ListsMe; \
            echo q; } | mailx -N -f .Stuff.ListsAll;

        :0:
        .Stuff.ListsMe/
    }

    :0:
    * ? grep "${FIRSTOFTHREAD}" mypostrefs
    .Stuff.ListsMe/

    :0:
    .Stuff.ListsAll/
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do I have the locking correct?

Paul.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

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