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