Mail locking question

Mail locking question

Post by Ben E.Y » Wed, 03 Jan 1996 04:00:00



Setup:

/usr/spool/mail -->  auspex machine running SunOS 4.1.3

clients ---->  HP 715, 730, 735's running HP-UX 9.01 and 9.05 (mostly
                        9.01)

Problem (may be related to question 7.8 of faq)

Subject: 7.8  How come I can't lock mail or other files on a Sun?

Believe it or not, Sun's lockd is broken at 4.1.x. The proper Sun patch
number is Patch-ID# 100075-09, called the "lockd jumbo patch".

--

Okay, we installed this patch and things went swimmingly until I re-compiled
elm for the hp's.  now we are having problems again.

The actual error (occasional) is something like:

cannot lock on /usr/spool/mail/username after N number of tries
giving up.

also, when users log into an HP and have incoming mail, the login session
locks up (after the copyright message, before the .cshrc is executed)

Someone suggested that make sure the user has environment variable
MAIL set to /usr/spool/mail and not /usr/mail.  On all our HP's we have
/usr/mail ---> /usr/spool/mail anyway, but I tried the above and we still
have problems.  I also changed .vueprofile to explicitly set MAIL to
/usr/spool/mail (says default is /usr/mail).  Still having problems with
this locking.

As far as I know, any other NFS mounts/file accesses are not having a
problem...just the /usr/spool/mail thing.

Any ideas and help would be greatly appreciated!!!!!!!!!!!

-ben
--
-----------------------------------------------------------------------------

http://www.cs.hmc.edu/~byau/byau.html                 (home page)
http://www.cs.hmc.edu/~byau/byau/sonics.html           (SuperSonics page)
-----------------------------------------------------------------------------

echo '[ln3*d2*69d3-PP]sr13snlrxPP32dd83PP2*1+PP83dP1+dPdd/+Pln5*3+P10Pq'|dc

 
 
 

Mail locking question

Post by Doug Siebe » Thu, 04 Jan 1996 04:00:00



>Setup:
>/usr/spool/mail -->  auspex machine running SunOS 4.1.3
>clients ---->  HP 715, 730, 735's running HP-UX 9.01 and 9.05 (mostly
>                    9.01)
>Problem (may be related to question 7.8 of faq)
>Subject: 7.8  How come I can't lock mail or other files on a Sun?
>Believe it or not, Sun's lockd is broken at 4.1.x. The proper Sun patch
>number is Patch-ID# 100075-09, called the "lockd jumbo patch".
>--
>Okay, we installed this patch and things went swimmingly until I re-compiled
>elm for the hp's.  now we are having problems again.
>The actual error (occasional) is something like:
>cannot lock on /usr/spool/mail/username after N number of tries
>giving up.

Well, first off, I'd not have a Sun as my mail server, yuck!  I had this
problem from HP clients to an HP mail server until I replaced HP's rmail
with procmail for local delivery.  Only the server does delivery in my
configuration, everything else is a client that forwards all mail, even
local mail, to the server -- less network traffic and fewer complications
since there are HPs, SGIs, IBMs and Suns to worry about.  Now I can run
sendmail without setuid root on any of the clients, which is nice considering
how often sendmail security holes are found.  Everything works quite nicely
using BSD Sendmail 8.7.x with the latest version of procmail.

--
Doug Siebert              || "Usenet is essentially Letters to the Editor
University of Iowa        ||  without the editor.  Editors don't appreciate

(c) 1995 Doug Siebert.  Redistribution via the Microsoft Network is prohibited.

 
 
 

1. Locking inboxes in /var/mail - without causing local agent (mail) to bounce mail

I am trying to figure out a method to modify inbox files in a /var/mail/
directory.  Specifically I want to do so without causing mail to fail to
deliver any new messages while I am modifying the file.  

It appears that if an inbox file is locked for too long, mail will
bounce the message.  I've looked at the source code for elm, and it
appears to lock the file in the same manner I am trying to lock it
(flock and .lock file).  

It seems that if I copy the file and delete it, then that operation is
quick enough not to step on mail, and all mail will be delivered that
was received during the period it was locked.  However, as this script
should eventually work for a mailbox with possibly 10,000 parcels of
mail in it, it may take too long to copy it, and incoming mail would be
bounced while the file is locked.

I am working on an HP-UX 10.20.  I want to run this script as a normal
user (should I set to mail group?).

I am writing this script in Perl.

Thanks in advance...
Darryl

2. FA: {3 Days} 16 Original Apple II Disks

3. Mail spool file locking problems during mail delivery

4. CLR error: 80004005. The program will now terminate

5. Mail file locking

6. Checking for character or number matches in LS

7. root.lock problem on NFS mounted /usr/mail

8. Problem when using more than one personality ?

9. Mail lock file problem. Help!

10. can not lock mail

11. HP/UX - mail: cannot lock on 'blank' mailbox

12. Help : Mail lock problem

13. NFS/file locking/mail sharing problems on HPUX 9.0.5