Thanks Steve. I filed JAMES-879 for this issue: https://issues.apache.org/jira/browse/JAMES-879
----- "Steve Brewin" <[EMAIL PROTECTED]> wrote: > Boris Burtin [mailto:[EMAIL PROTECTED] wrote on: 20 October 2008 > 18:46 > > Hi Boris > > Thank you for the explanation. It's good to hear that you have been > using jSieve for sometime, and based on Jira activity, without finding > many problems. > > As you suggested in an earlier post, please file this as a Jira issue. > Given your experience with parsing the node trees I suspect that you > are as well placed as anyone within our community to resolve it in a > timely manner with a patch; if you feel so inclined. > > Cheers > > --Steve > > > Yeah, "we" == Zimbra. :-) We've been using jSieve on the > > back end for about 3-4 years now. When a user creates mail > > filters, the web client code sends a SOAP request to the > > server. The server processes the request, generates the > > appropriate Sieve script, and saves it in the user's account > > settings. When a message comes in, jSieve generates the > > filter actions that will be performed on the incoming message. > > > > When the user wants to modify his filters, we walk the jSieve > > parse tree to generate the SOAP response. So we have > > SOAP->Sieve script code and jSieve tree->SOAP code. The only > > thing we don't have is jSieve tree->Sieve script, but I was > > able to use the other two to do a swift hack. > > > > The only remaining case is the one I'm dealing with now. If > > a user moves or renames a folder, I want to update all the > > scripts that reference that folder. So I parse the script, > > walk the tree, and modify the nodes in-place. After I modify > > the nodes, I want to save the updated script in the user's > > account settings. This requires serializing the parse tree > > into a String. > > > > I've attached a copy of the SOAP API planned for ZCS 6.0, for > > anyone that's interested. > > > > Boris > > > > ----- "Steve Brewin" <[EMAIL PROTECTED]> wrote: > > > > > Boris Burtin [mailto:[EMAIL PROTECTED] wrote on: 18 October > 2008 > > > 00:00 > > > > > > > Thanks for following up so quickly. When a user moves or > > > > renames a folder, we want to update any filter rules that > > > > reference the folder. I actually have a workaround: Node -> > > > > our XML syntax -> Sieve. Icky, but it works. I'll file an > > > > enhancement request in JIRA to add a standard Node -> String > > > > conversion API. > > > > > > > > Thanks! > > > > > > > > Boris > > > > > > Boris > > > > > > Again, just because I'm curious. A few questions. > > > > > > Is this needed because you don't keep the original Sieve > > scripts after > > > parsing or because you are dynamically modifying the nodes > > and want to > > > capture the results as a Sieve script? > > > > > > Does your workaround mean you have node->your XML syntax > conversion > > > coded already? > > > > > > Finally, when you say "we" does this mean Zimbra? What's > > the story? It > > > is always a boost to know when a community's efforts are proving > > > worthwhile to others. Often it is hard to tell. > > > > > > Cheers > > > > > > -- Steve > > > > > > > > > > ----- "Steve Brewin" <[EMAIL PROTECTED]> wrote: > > > > > > > > > Boris Burtin [mailto:[EMAIL PROTECTED] wrote on: 17 October > > > 2008 > > > > > 22:00 > > > > > > > > > > > Is it possible to generate a Sieve script from a Node tree? > I > > > > > > have code that manipulates a tree in-place, and I'd like to > > > > > > > get the modified script as a String. I assumed this would be > > > > > > > easy, but I can't seem to find the right API to do it. > > > > > > > > > > > > Thanks in advance, > > > > > > > > > > > > Boris > > > > > > > > > > The only translation from nodes to another form I know of is > to > > > > > generate JSieve operations. You could mirror the same code > > > > pattern to > > > > > emit other forms such as a Sieve script. > > > > > > > > > > I'm curious about your use case. What is the driver for > wanting > > > this > > > > > ability? > > > > > > > > > > Cheers > > > > > > > > > > --Steve > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
