Re: [Kolab-devel] permissions for sieve to store user flags

Timotheus Pokorra <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <CAJ0=nQdJTpUn6J5jov537s7n24Yx+Bq4T1cB4g-=NFHr+Mmwuw__29923.0383745909$1378115190$gmane$org@mail.gmail.com>
Hello,
I finally found the solution.
The sieve scripts are run with user firstname^[email protected].
So adding the acl w for that user makes my scenario work.

for example:
cyradm --user cyrus-admin localhost
setacl user/[email protected] admin^[email protected] w

Perhaps it helps someone else as well,
  Timotheus

On 28 August 2013 15:01, Timotheus Pokorra <[email protected]> wrote:
> Hello,
> I wonder if somebody has an idea about this:
> How can I give the sieve process w acl permissions to write user defined
> flags?
>
> Here the full story:
> I am trying to add a plugin to roundcube that stores labels or flags with
> the emails.
>
> I modified the message_label plugin to store IMAP4flags similar to
> Thunderbird.
> https://github.com/tpokorra/message_label/tree/message_label_tbits
>
> Then I modified the managesieve plugin to support user defined labels.
> But I noticed that the user defined label is not applied.
> First I thought the reason is that cyrus sieve does not support imap4flags
> yet:
> https://lists.kolab.org/pipermail/devel/2011-September/012965.html
>
> But it does store the user defined flags fine through roundcube:
> https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_imap_generic.php#L1950
>
> Then I found out that the problem is a permissions problem.
> http://git.cyrusimap.org/cyrus-imapd/tree/imap/append.c#n811
> The user that is setting the user flag needs to have write permissions.
> That fits the description at
> http://cyrusimap.web.cmu.edu/docs/cyrus-imapd/2.4.8/overview.php#aclrt
> for w: The user may modify flags and keywords other than "Seen" and
> "Deleted" (which are controlled by other sets of rights).
>
> The question is:
> which user is used by sieve to set the flags?
> I could then use http://www.php.net/manual/en/function.imap-setacl.php to
> set the acl for that user.
>
> Or am I completely on the wrong track?
>
> Thanks for any suggestions!
>
> Timotheus
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.