Re: locking rcvstore?

2002-07-11 Thread John Summerfield

 Chris Garrigues [EMAIL PROTECTED] wrote:
 
 I always call rcvstore with this wrapper:
 
 #!/bin/bash
 
 ...
 
 and it would be nice if it weren't needed.
 
 I'm not convinced that it is needed.
 
 The only risk is that your sequences might be corrupted.  I prefer
 that to the problems caused by stuck locks.


I had some serious mail corruption a year or two ago. It arose because of an 
enormous mess of coincidence:

1) I managed to get two copies of fetchmail running at the same time on the same 
mail boxes (fetchmail bug)

2) The POP3 daemon (cucipop) at the other end didn't lock mail boxes 
(non-compliant)

3) My procmail recipes didn't implement locking because I assumed nmh did.

4) nmh didn't lock anything, (and I think mh doesn't either).

Lack of locking is a problem that needs to be fixed. I lost a few dozen emails 
over a couple of days.



-- 
Cheers
John Summerfield

Microsoft's most solid OS: http://www.geocities.com/rcwoolley/

Note: mail delivered to me is deemed to be intended for me, for my disposition.

==
If you don't like being told you're wrong,
be right!






Re: locking rcvstore?

2002-07-11 Thread Michael Richardson


  Aside from trashing sequences (which I've experienced on occasion, no idea
why)
  I've run into situations where I wind up doing an inc from two difference
sources into the same folder. Usually due to impatience on my part. 

  The result was a mess of two processes using the same message numbers!
  My impression is that inc doesn't do any locking on message numbers, but I
could be wrong.

  Btw, my installed from CVS copy of nmh seems to be ignoring my
.mh_profile's

Alternate-Mailboxes: [EMAIL PROTECTED], mcr@*, 
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

  when removing stuff for reply-all. Anyone else have this problem? Is mcr@*
still a valid?

]   ON HUMILITY: to err is human. To moo, bovine.   |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON|net architect[
] [EMAIL PROTECTED] http://www.sandelman.ottawa.on.ca/ |device driver[
] panic(Just another NetBSD/notebook using, kernel hacking, security guy);  [



  




Re: locking rcvstore?

2002-07-11 Thread Sean Kamath


[In a message on Thu, 11 Jul 2002 14:29:20 EDT,
the pithy ruminations of Michael Richardson were:]

  Aside from trashing sequences (which I've experienced on occasion, no idea
why)
  I've run into situations where I wind up doing an inc from two difference
sources into the same folder. Usually due to impatience on my part. 

  The result was a mess of two processes using the same message numbers!
  My impression is that inc doesn't do any locking on message numbers, but I
could be wrong.

I think anytime that there is a possibility of multiple processes
writing to the same file, locking should be enableable.  Even if
it's a command line switch (everyone likes to say use procmail, but
this is essentially what procmail does: locks file and folders by
default, and you can disable or use a different file for locking if
you choose).

Over the years, we've had a LOT of email being trashed because of lock
problems.  We end up doing arcane workarounds to fix it.

You can have timeout's on lockfiles, and fail.  You can have command
line/compile time options to disable/change locking.  But the sequence
file and the next message should be locked when written.  Oh, and the
mail drop should be locked when it's being inc'ed.

Using locking in the shell is only slightly better than no locking
at all. . .

Sean