2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Create folders if not...
FromSent OnAttachments
Malaney J. HillDec 2, 2005 5:31 am 
Jay LeeDec 2, 2005 5:45 am 
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:Re: [maildropl] Create folders if not exist in IMAPActions...
From:Jay Lee (jl@pbu.edu)
Date:Dec 2, 2005 5:45:57 am
List:net.sourceforge.lists.courier-maildrop

Malaney J. Hill said:

Is it possible for maildrop to create folder in my users account if the folder does not exist?

i.e.

if (! -d $HOME/$DEFAULT/.Spam/) { exception { // create $HOME/$DEFAULT/.Spam/ } }

Right now when I create a new account, if SA determines that a message contains spam my rule says to place it in the .Spam folder. But if that folder does not exist it goes right to the users inbox. If maildrop is not the tool for this then what is?

Here's what I use to create, subscribe and deliver to a Spam folder:

if (/^X-Spam-Status: *Yes/:h) { #Create SPAM IMAP folder if they don't have one `test -d $MAILDIR/.Spam` if( $RETURNCODE == 1 ) { `/usr/lib/courier/bin/maildirmake -f Spam $MAILDIR` `echo INBOX.Spam >> $MAILDIR/courierimapsubscribed` } exception { to "$MAILDIR/.Spam/" } }