procmail
[Top] [All Lists]

locking problem?

1999-05-25 07:20:52
Hi,
        I have the following recipe set up to send urls in the body of the
message through lynx and mail it back to me.
        It seems from the results that the lock file is not working, as
occasionally I get back messages that have a couple of pages tacked together.

recipe follows:
===================================================================
#my own web-email system
:0
*   ^Subject:[  ]##################
* ! ^X-Loop: msaroff(_at_)pca\(_dot_)net
  {
   LOCKFILE=getweb.lock

   :0h #
   backto=|formail -r|formail -x to

   #mail results back to person
   :0b # regional lockfile is still in effect
   | $HOME/getweb/getweb $backto

   LOCKFILE # release regional lock
  }
============================================
here is the file
cd $HOME/getweb
cat >$HOME/getweb/webpages
from=$1
ans=1;
while [ $ans != 0 ]; do
url=`head -1 $HOME/getweb/webpages`
tail +2 $HOME/getweb/webpages >$HOME/getweb/moo
cp $HOME/getweb/moo $HOME/getweb/webpages
/usr/bin/lynx -dump $url >webit
(echo "From msaroff(_at_)pca(_dot_)net";\
echo "X-Loop: msaroff(_at_)pca(_dot_)net";\
echo "Subject: ${url}";\
echo "To: ${from}";\
echo "MIME-version: 1.0";\
echo "Content-type: text/plain; charset=us-ascii";\
echo "Content-transfer-encoding: 7BIT"
echo "";\
cat $HOME/getweb/webit;)|/usr/bin/sendmail -t
ans=`ls -al $HOME/getweb/webpages |/usr/bin/awk '{print $5}'`
done



-- 
Matthew Saroff
Do not reply directly to this message.  Reply to
msaroff(_at_)pobox(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>