auto-create folder from sieve

Ken Murchison ken at
Thu Jul 24 16:02:43 EDT 2003

Andrew Morgan wrote:

> Is it possible for sieve to auto-create folders that don't already exist
> when it tries to fileinto?  I've got a sieve script like the following:
> require "fileinto";
> # Filter spam
> if header :contains "X-Spam-Flag" "YES" {
>         fileinto "INBOX.junk-mail";
> }
> But the folder "INBOX.junk-mail" must already exist or sieve throws an
> error in syslog (Fileinto: Mailbox does not exist) and delivers it to
> It would simplify our setup and management of sieve scripts if we could
> have the folder automatically created if it does not already exist.  Is
> there a way to enable this?

It would be possible to autocreate on fileinto, but how do you determine 
that this is what the user wants vs. the mailbox name being typed 

What really should happen is that a warning should be spit out at 
upload/parse time telling the user that the mailbox doesn't exist.

Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--

More information about the Info-cyrus mailing list