tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: managers account <managers () mannet ! mcb ! net>
To: tru64-unix-managers
Subject: Clemson pop3 locks summary
Date: Mon, 13 May 1996 10:57:58 +0000	[thread overview]
Message-ID: <96076332421323.tru64-unix-managers.marc@archive.invalid> (raw)

I asked if anybody had patches or ideas about the Clemson pop3 daemon 
leaving user locks in place.
No real solution but three observations:
	1 use the pop3 that comes with Pine
	2 Is the server at fault or is the client causing the problem with 
damaged mail envelopes?
	3 Change to popper or run   rm /usr/spool/mail/$1.lock as a macro

I dont really want to change the daemon for this error.  Clemson runs 
very well and was VERY easy to install.  I do suspect the clients but it 
has happened with Turnpike Eudora and Pegasus.

My own work around, but not solution was the following awk program which 
I am including because it has wider application than just locks: it can 
be used via cron to monitor for the existance of any file or group of 
files.  YMMV!
Thanks to all who replied.

## Written by Stuart McKenzie MANNET (stuart@mcb.net) May 1996
## This awk program checks for a lock file and removes it if its over 15 minutes old
## Run it with a cron every 10 mins.  It will look at the oldest lock and whack
## it if over 15 mins. If < 15 mins or no locks it will exit safely.
BEGIN {
"date" | getline d
split (d,darray," ")
split (darray[4],t2,":")
tnow = darray[3]*1440  +t2[1]* 60 + t2[2]
## get date and parse it. create a value for minutes since day 1 of month
"ls -lrt| grep .lock" | getline l
## edit above statement to reflect path to file or group of files u r monitoring
split (l,array," ")
if (array[6] != darray[2]) 
	tnow = 1440
## handle special case of file creation and time now being in different months
split(array[8],larray,":")
t=array[7]  *1440 +larray[1]*60 + larray[2]
## create a value in mins since day 1 of month of file creation time
	if(t==0) exit
{if (tnow - t > 15)
system("rm " array[9])
## whack it
		else
			exit }
}

Stuart McKenzie

                 reply	other threads:[~1996-05-13 10:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox