procmail
[Top] [All Lists]

'Error writing to', but only *sometimes*

1998-06-24 18:40:51

Trying to debug my script...actually been using it for a long time.  

Basically I've got a script that checks the sender, if it hits, it checks
to see if a directory exists for it (monthly changes)--if it does it
creates it, if not, it goes on.  Then it copies the mail into a file, then
it runs mhonarc to archive it.

Problem is, on the first day of the month when it has to create the
directory, it doesn't always write the file in the directory; sometimes it
gives me an 'Error writing to:" ...  But only SOMETIMES...actually seems
to be every other time, but I've only tried about 10 times.  I've tried
adding an i to the second case for ignoring warnings, but that doesn't
help.

I'm at my wits end here...any help is greatly appreciated!!!


Here's my procmail recipie:

----------------------------------rc.maillists-----------------------------
ARCHLOC="/www/itg/paint-l"
MONTHNAME=`date +%y-%m`
PRETTYMONTH=`date +%m/%y`
UMASK=002

:0
* ^TOpaint-l(_at_)jade*
{
        # Sorting by month
        # Check to see if directory exists; if not create it
        # cc message on to next case

        :0 ic
        * ? test ! -d $ARCHLOC/$MONTHNAME
        | mkdir $ARCHLOC/$MONTHNAME

        # copy message for safekeeping
        # cc message on to next case

        :0 c
        $ARCHLOC/$MONTHNAME/IN.paint-l

        # add message to archive with mhonarc

        :0:
        | mhonarc -rcfile $ARCHLOC/df.rc -add $ARCHLOC/$MONTHNAME/IN.paint-l \
          -outdir $ARCHLOC/$MONTHNAME -idxfname index.html \
          -title "Paint-L Mail-Archive : $PRETTYMONTH" \
          -ttitle "Paint-L Mail-Archive : $PRETTYMONTH (thread)"
}

-------------------------------------------------------------------------------

And here's the procmail log on a failure:

...
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(
-Resent)?)-To):(.*[^a-zA-Z])?)paint-l(_at_)jade*"
procmail: Executing "test,!,-d,/www/itg/paint-l/98-06"
procmail: Match on "test ! -d /www/itg/paint-l/98-06"
procmail: Executing "mkdir,/www/itg/paint-l/98-06"
procmail: Assigning "LASTFOLDER=mkdir /www/itg/paint-l/98-06"
procmail: Locking "/www/itg/paint-l/98-06/IN.paint-l.lock"
procmail: Error while writing to "/www/itg/paint-l/98-06/_11SQhera"
procmail: [77174] Wed Jun 24 20:11:38 1998
procmail: Locking "/www/itg/paint-l/98-06/IN.paint-l.lock"
procmail: Assigning "LASTFOLDER=/www/itg/paint-l/98-06/IN.paint-l"
procmail: Opening "/www/itg/paint-l/98-06/IN.paint-l"
procmail: Acquiring kernel-lock
procmail: Unlocking "/www/itg/paint-l/98-06/IN.paint-l.lock"
procmail: Couldn't determine implicit lockfile from "mhonarc"
procmail: Locking ".lock"
...


ben

  benjamin grosser | manager | visualization, media and imaging laboratory
  imaging technology group | beckman institute for advanced science and tech.
         grosser(_at_)uiuc(_dot_)edu | 217.244.5669 (ofc) | 217.244.8371 (fax) 

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