Tag Archives: cyrus

Cyrus: sieve scripts in shared folders

Attaching a sieve script to a shared folder is a little tricky. First, you need to understand that Cyrus has two types of repositories where you can have Sieve scripts: Personal and Global. Personal is per user and global is for every user. Global scripts aren’t applied on incoming messages by default, users must include them in their scripts.

Also, there are two types of Global scripts: global and global per domain.

When you log into Cyrus IMAP with sieveshell you have the following combinations (I suppose that you have manager and manager@example.com as admin in imapd.conf):

  • sieveshell -a manager -u manager localhost: To edit global scripts.
  • sieveshell -a manager@example.com -u manager@example.com localhost: To edit global script of example.com domain.
  • sieveshell -a user@example.com -u user@example.com localhost: To edit personal scripts of some user.

Scripts for shared folders work different from user scripts. The last ones are uploaded to the user’s repository and attached to the inbox when you activate them. The first ones must be uploaded to the global domain repository and attached to a shared folder by an user that has permission on it. You have to use the second combination of the listed above to load them and cyradm (or another compatible client) to do the attach:

sieveshell -u manager@example.com -a manager@example.com localhost > put /tmp/my_script my_script cyradm -u user@example.com localhost localhost.localdomain> mboxcfg shared.folder@example.com sieve my_script

Post to Twitter