procmail
[Top] [All Lists]

safey net for $MAILDIR

1999-09-09 23:30:14

everyone knows that a non-existent $MAILDIR is not a good thing.

is this an adequate method of protection?

:0w
* ! ? test -d "${MAILDIR}"
{
        LOG="
WARNING: no ${MAILDIR} found, will attempt to create            
"
        :0chi
        |mkdir "${MAILDIR}"
        
        :0ecw
        {
        
                LOG="

        *** CREATION OF $MAILDIR FAILED ***
        *** USING $HOME for $MAILDIR    ***

"
        MAILDIR="${HOME}"
        }
}       


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