5 messages in net.sourceforge.lists.courier-maildrop[maildropl] Re: Re: create maildir fo...
FromSent OnAttachments
Christian KalkhoffJun 17, 2002 8:20 am 
Derrick 'dman' HudsonJun 17, 2002 10:12 am 
Christian KalkhoffJun 17, 2002 10:23 am 
Derrick 'dman' HudsonJun 17, 2002 11:52 am 
Christian KalkhoffJun 17, 2002 1:12 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Re: Re: create maildir folders on demandActions...
From:Derrick 'dman' Hudson (dm@dman.ddts.net)
Date:Jun 17, 2002 11:52:44 am
List:net.sourceforge.lists.courier-maildrop

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/