auto-create folder from sieve
Andrew Morgan
morgan at orst.edu
Thu Jul 24 16:03:56 EDT 2003
On Thu, 24 Jul 2003, Ken Murchison wrote:
>
>
> 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
> > INBOX.
> >
> > 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
> incorrectly.
That is certainly an issue, but the mail would not be lost in any case,
just misplaced.
> 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.
We're using .sieve files in user home directories, so that isn't really an
option here.
Andy
More information about the Info-cyrus
mailing list