Sieve runtime error "mailbox does not exist"

Richard <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hello again!

Pushing my luck asking a second question so soon, sorry.  This is the last step before I can declare a mailserver to be configured, and ready for users to break it.  (Users should not be allowed; they spoil everything.)

I am getting this when running a sieve script:
www cyrus/lmtpunix[4215]: sieve runtime error for [email protected] id <CALvLiS=...>: Fileinto (Spam): Mailbox does not exist

So it is clear the sieve script is being picked up and processed.  It is absurdly simple:
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
    fileinto "Spam";
}

cyradm tells me that the Spam folder is there:
localhost> lm
user/test.three/[email protected] (\HasNoChildren)
user/test.three/[email protected] (\HasNoChildren)
user/test.three/[email protected] (\HasNoChildren)
user/test.three/[email protected] (\HasNoChildren)
user/test.three/[email protected] (\HasNoChildren)
user/[email protected] (\HasNoChildren)

These are being created automatically, courtesy of:
autocreate_quota: 0
autocreate_inbox_folders: Sent | Trash | Spam | Drafts | Deleted
autocreate_subscribe_folders: Sent | Spam

... in imapd.conf.

Mail is being delivered to the inbox quite happily - it's just the sieve which is failing.

I'm not hugely confident with sieve configuration, so I imagine this is another silly configuration error I've overlooked.  Any pointing-out of the glaringly obvious will be gratefully received.


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T155a667e2e7493f6-M84a9bf9f251d98e4e0aa2af5
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.