procmail
[Top] [All Lists]

Re: lock files (related topic)

2002-04-11 12:16:21
I used google to learn and find out about the Solaris lockfile man page.
However, I did not find the default time-out in the lockfile man page.
While it did prevent reception of mail, the lockfile disappeared
before I fully tested editing the mailbox and the mail was appended.

I did:
   lockfile /var/mail/$LOGNAME.lock
   vi /var/mail/$LOGNAME

some other sender: 
   mailx -s test $LOGNAME < /tmp/somefile

Dave

Date: Thu, 11 Apr 2002 11:32:03 -0700 (PDT)
From: Dave Robbins <dave(_at_)geol(_dot_)ucsb(_dot_)edu>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: lock files (related topic)

My system is Solaris 7 with sendmail 8.9.3 (Sun's /usr/lib/sendmail
but I'm planning to go back to sendmail.com's sendmail very soon).

Recently I had to use vi to edit a mailbox that had a corrupted header
which prevented a user from downloading his mail.  The proper method
to do this, it would seem, would be to first create a lock file
to prevent new mail from being lost while I was editing.

As I've seen it, the lockfile used by Sun's sendmail is called
/var/mail/.<username>.lock -- yet when I touch that file,
I can still send a message to that particular mailbox and it
is immediately appended.

My general impression is that the following sequence should be
used to manipulate e.g. my mailbox:

   touch /var/mail/.dave.lock
   vi /var/mail/dave
   rm /var/mail/dave.lock

but this apppears to be incorrect.

Could someone please tell me the proper method to accomplish 
such manipulation of a mailbox (editing or appending) without
causing mail to be lost.   Thanks and sorry if this is a bit
off-topic.

Dave
_______________________________________________
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>