On Tue, Jun 18, 2002 at 07:22:27AM +0200, Christian Kalkhoff wrote:
| Derrick 'dman' Hudson wrote:
|
| >| I would love to have the possibility to let maildirmake create the
| >| dirs from within maildroprc so i would have the right permissions.
| >
| >| I already have the following lines in maildroprc. But it seems
| >| not to work.
| >|
| >| import SENDER
| >- test -d $HOME/Maildir/ || maildirmake $HOME/Maildir
| >+ `test -d $HOME/Maildir/ || maildirmake $HOME/Maildir`
| >
| >That looks like a shell command, so it needs to be run in a shell.
| i tried it out and... it doesn't work. Seems maildrop trys to open the
| mailbox before it is running the script.
Odd. I don't know about "maildroprc", but in my own .mailfilter I
have this for every rule :
BASE=$HOME/Mail
{
F=$BASE/the/folder/path/
`$HOME/bin/create_maildir.sh "$F"`
to "$F"
}
so that each folder is created when it is needed. I don't use
maildirmake because sometimes I need parent directories created too.
That create_maildir.sh script looks like this :
#!/bin/bash
FOLDER="$1"
# no folder specified, bug out
if [ -z "$FOLDER" ] ; then
exit 1
fi
# already exists, go away
if [ -d "$FOLDER" ] ; then
exit 0
fi
# make it and any parent directories
mkdir -p $F/{cur,new,tmp}
This setup works for me.
Does $HOME exist before you try running maildirmake?
I hope you can figure out why it isn't working for your system.
HTH,
-D
--
Your mouse has moved.
You must restart Windows for your changes to take effect.
http://dman.ddts.net/~dman/