procmail
[Top] [All Lists]

Re: MH Mail folders question

2002-06-19 05:30:45
Edward Wildgoose <Edward(_dot_)Wildgoose(_at_)FRMHedge(_dot_)com> wrote:
A quick and easy question:  If I have procmail delivering to an MH folder,
and my mail server might deliver multiple local messages simultaneously,
then do I need a lock file?

You are definitely correct that you do need locking.  Your delivery
patterns might be such that you always get lucky and never see a collision,
but it's not safe to trust to luck.  You will need to specify via procmail
that to make sure you don't get multiple processes trying to update the
.mh_sequences file, lest you be required to edit it manually and remove
bits where 2 delivery processes stepped on each other (which I've had
happen on some of my high volume folders).

I use a scheme like:

:0
* List-Id:.*(procmail|smartlist)
{ FOLDER=in/pm
  #[other common rules for removing subject-tags, etc]
  :0:$FOLDER/$LOCKEXT
  |rcvstore +$FOLDER
}

Then making new rules means copying a block [vi: y}P] and editing only the
match pattern and the FOLDER.

Unfortunately, since mh's tools (show, anno, et.al.) don't do any locking,
they might try updating a .mh_sequences file while a delivery is occurring.
I have no general solutioon for that.


-philip

-- 
Philip Kizer, Senior Lead Systems Engineer, Texas A&M University
USENIX Liaison to Texas A&M University         <usenix(_at_)tamu(_dot_)edu>
Texas A&M CIS Operating Systems Group, Unix   <pckizer(_at_)tamu(_dot_)edu>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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