On Sun, 08 Aug 2004 23:39:52 -0500, Bill McCormick
<wpmccormick(_at_)sbcglobal(_dot_)net> wrote:
Hello,
Trying to get mailing list folders to be created on the fly (using
straight procmail).
Here's what I use:
#Generated by several members of the list
:0
* ! LISTNAME ?? ^^^^
{
# LOG="List: $LISTNAME$NL"
:0: $HOME/lock
$MLDIR/$LISTNAME/$MYDATE.$LISTNAME
# if the action failed, probably the directory does not
# exist, so create it
:0eW
{
LOG="FAILED WRITE$NL"
MAKENEWDIR=`test -d $MLDIR/$LISTNAME || mkdir -p $MLDIR/$LISTNAME/`
}
# Now save the message again
:0a:
$MLDIR/$LISTNAME/$MYDATE.$LISTNAME
# If we get this far, something is quite wrong.
# Still failed? Better save the message somewhere we can check it
:0
{
LOG="FAILED WRITE NEW DIRECTORY $LISTNAME$NL"
:0: $HOME/lock
$MLDIR/FAILED_LIST_SORT
}
}
I've never had it fail. YMMV
--
::::== <http://www.kreme.com> ==::::
:: Don't get saucy with me, Bernaise ::
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail