On 7/7/02 4:35 PM, David W. Tamkin <dattier(_at_)ripco(_dot_)com> wrote:
Adam [...] gets these results:
| Now, if the directory already exists, the message gets filed just
| fine. But if it has to create the directory, I get the following
| errors in my log and the message gets stored in a *file* named
| "0207."
| mkdir: cannot create /users/sfc/web/gms/sfa/apps/0207: File exists
| chmod: can't access /users/sfc/web/gms/sfa/apps/0207/msg.*
Bart has posited that perhaps $SFAAPP has already been created as an empty
plain file. Another thing that crossed my mind was that, since the recipe
calling mkdir has no `w' nor `W' flag, procmail might be faster to move down
to the next recipe and create $SFAAPP as a plain file than mkdir is to create
it as a directory.
That makes sense.
For the record, *my* copy of PROCMAILEX(5) (dated 1995/10/30) doesn't
contain a W flag. :)
My first recommendation is this:
:0 a
{
:0 icw
* ? test ! -d $SFAAPP
| mkdir $SFAAPP && chmod 755 $SFAAPP
oldumask=$UMASK
UMASK=022 # maybe 133?
:0ac:
$SFAAPP
UMASK=$oldumask
}
Okay, this successfully creates the directory if it doesn't exist, files the
first message, and sets the permissions. Any subsequent messages, however,
don't get filed at all.
--
Adam Bailey | Chicago, Illinois
adamb(_at_)lull(_dot_)org | Finger/Web for PGP
adamkb(_at_)aol(_dot_)com | http://www.lull.org/adam/
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail