home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume35 / procmail / part01 / procmail280 / examples / 1rmail < prev    next >
Text File  |  1993-02-05  |  400b  |  22 lines

  1. #!/bin/sh
  2. #
  3. # specify the mailbox file you want to read on the command line
  4. #
  5. MAILDIR=$HOME/Mail
  6. cd $MAILDIR
  7. LOCKFILE=$HOME/.lockmail
  8. if lockfile -! -r1 $LOCKFILE
  9. then
  10.  echo Mail is currently arriving, please wait...
  11.  while
  12.    lockfile -! -4 -r2 $LOCKFILE
  13.  do
  14.  echo Mail is still arriving...
  15.  done
  16. fi
  17. trap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
  18. #
  19. # Call you favourite mailer here.
  20. #
  21. /usr/ucb/mail -f $*
  22.