Cannot get sieve working with 2.3.11

Albert Chin info-cyrus at mlists.thewrittenword.com
Sun Feb 3 03:18:23 EST 2008


On Sat, Feb 02, 2008 at 08:21:44AM -0600, Albert Chin wrote:
> I compiled 2.3.11 on FreeBSD 6.3 but cannot get sieve working. I have
> a simple sieve script:
>   $ cat china.sieve
>   if header :contains "Subject" "" {
>     discard;
>   }
>   $ sieveshell [cyrus server]
>   > put china.sieve
>   > active china.sieve
>   > list
>   china.sieve  <- active script
>   > quit
> 
> In imapd.conf I have:
>   duplicatesuppression: true
>   sieveusehomedir: false
>   sievedir: /ext/mail/sieve
> 
> $ find /ext/mail/sieve
> /ext/mail/sieve
> /ext/mail/sieve/global
> /ext/mail/sieve/global/china.sieve.bc
> /ext/mail/sieve/global/china.sieve.script
> /ext/mail/sieve/global/defaultbc
> $ cd /ext/mail/sieve/global
> $ ls -l
> -rw-------  1 cyrus  cyrus  88 Feb  2 14:08 china.sieve.bc
> -rw-------  1 cyrus  cyrus  48 Feb  2 14:08 china.sieve.script
> lrwx------  1 cyrus  cyrus  14 Feb  2 14:03 defaultbc -> china.sieve.bc
> 
> The sieve script above should discard all mail with a Subject header
> but it does not. Any ideas?

Ok, found the problem. In timsieved/actions.c we have:
  if (sieved_userisadmin) {
      strlcat(sieve_dir, "/global", size);
  }
  else {
      char hash = (char) dir_hash_c(user, config_fulldirhash);
      snprintf(sieve_dir+len, size-len, "/%c/%s", hash, user);
  }

imapd.conf has:
  admins: china

Removing myself from admins gets sieve working. But, why the above? It
would seem that Cyrus assumes users with administrative rights would
not be using sieve.

-- 
albert chin (china at thewrittenword.com)


More information about the Info-cyrus mailing list