Article View: comp.mail.mush
Article #699Questions about folder locking
From: Andrew Patrick
Date: Mon, 04 Mar 1991 20:19
Date: Mon, 04 Mar 1991 20:19
45 lines
1962 bytes
1962 bytes
First, I am running version 7.2.0 on a Sun (OS 4.0.3c) mostly using
tool mode.
I am looking at a script that automatically sorts my incoming mail from
various mailing lists and puts it into different folders. This script
is called from my .forward file using:
"|~/bin/sortmail andrew"
The important parts of the script does the following:
- the body of the message is stored in the file $MSGTMP
- if a mailing list is recognized, the destination folder is stored in
variable $box
- then the message is filed using:
cat $MSGTMP >> $box
echo Filed to $box >> $logfile
- if no mailing lists are found, then the variable $box is set to
/usr/spool/mail/$user
cat $MSGTMP >> $box
echo Not classified, filed to $box >> $logfile
It seems to me that this script defeats all file locking and could be
very dangerous. For example, if I am reading and updating a folder for
a mailing list while new messages are coming into that folder.
My questions are:
- is this method as dangerous as it appears?
- is there a way to use file locking to avoid the dangers?
- is there a better way to have your mail sorted throughout the day?
- I know how to use 'pick' to sort mail once it is in the spool
area, and I know I could run the sort each time Mush is
started, but I would like to run Mush in tool mode all day and
still only see non-mailing-list mail as it comes in.
--
Andrew Patrick, Ph.D. Department of Communications, Ottawa, CANADA
andrew@calvin.doc.CA
"The interface IS the program."
Technical Details
Message-ID:
<1991Mar4.201901.1617@rick.doc.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!dgbt!rick.doc.ca!calvin.doc.ca!andrewShow Full Headers
Complete Article Headers
Newsgroups: comp.mail.mush Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!dgbt!rick.doc.ca!calvin.doc.ca!andrew From: andrew@calvin.doc.ca (Andrew Patrick) Subject: Questions about folder locking Message-ID: <1991Mar4.201901.1617@rick.doc.ca> Sender: news@rick.doc.ca Nntp-Posting-Host: calvin.doc.ca Organization: Communications Research Centre, Ottawa Date: Mon, 4 Mar 1991 20:19:01 GMT