procmail
[Top] [All Lists]

Folder test/create problem

2002-07-07 14:09:41
Greetings,

I've got a recipe set up to file incoming messages from a certain
criteria into a directory and chmod it so that people can view the
messages on the web. Everything worked fine until I decided to copy
the man example about diverting the messages into a named directory.

What follows is the relevant part of the recipe. The rest works
fine, so I won't complicate things.

    SFAAPP = $HOME/web/gms/sfa/apps/`date +%y%m`
    
    :0 a
    {
        :0 ic
        * ? test ! -d $SFAAPP
        | mkdir $SFAAPP;chmod 755 $SFAAPP
    
        :0 c:
        $SFAAPP
    
        :0 c
        | chmod 644 $SFAAPP/msg.*
    }

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.*

What am I doing wrong?

TIA!

-- 
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

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