#!/bin/csh
#mail-in	put mail into a spool file
#with locking.

# Change this to the incoming mail spool directory.
umask 77
cd /u1/user/mark/in

setenv FILE temp$$."`/u1/user/mark/bin/rnd`"
setenv MESS in$$."`/u1/user/mark/bin/rnd`"

loop:
if(-e lock) then
   sleep 1
   goto loop
endif
cat > $FILE
mv $FILE $MESS

if (-e none) then
   \rm none
endif
