auto-create folder from sieve

Ken Murchison ken at oceana.com
Thu Jul 24 16:37:29 EDT 2003



Andrew Morgan wrote:

> 
> 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.

Its not lost as it stands right now.  I'd argue that its easier to find 
these misfiled messages if they land in the INBOX, than some new 
subfolder with a name that you didn't intend.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp





More information about the Info-cyrus mailing list