-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure when importing sieve vacations from Horde with nested ifs #5540
Comments
one quick and dirty workaround would be to drop all rules with action discard, that don't have a test. in ./plugins/managesieve/lib/Roundcube/rcube_sieve_script.php, in private function _parse_text($script), section Simple commands:
|
Handling of nested rules is really not simple and I would rather not work on this. So, I propose a simple fix that will ignore all rules with "nested content". In such a case it would mean that the vacation rule would be ignore and the output would be:
What do you think? |
ok, I understand that the nested ifs are too complicated to convert. Yes, dropping the rule with nested ifs makes sense. It is a lot better than the current bug :) Thank you, @alecpl ! |
Done. |
* 'master' of https://github.com/roundcube/roundcubemail: Simplified/unified key info frame Identicon plugin Parse error and CS fixes after PR merge Added replacement variables support in password_pop_host (roundcube#5539) Fix variable substitution in ldap host for some use-cases, e.g. new_user_identity (roundcube#5544) Fix handling of scripts with nested rules (roundcube#5540) Bump up Enigma version number Update changelog with 1.2.3 release CS fixes and update changelog Do not store passwords on disk - use proc_open instead of popen (roundcube#5531) Make sure subject is always on proper place in widescreen mode Remove redundant padding in textarea for raw editor Shrink CodeMirror code Release managesieve 8.8 Cleanup and improve CodeMirror integration Fixed redundancy in sql caching system and compatibility with Galera Cluster (roundcube#5439) Use GSSAPI only if configured (roundcube#5530) handles multiple errors and shows error messages in editor tooltips syntax highlighted raw editor for sieve filter sets(codemirror)
We have sieve vacation scripts from Horde with nested ifs. If we try to reuse them, we have had bad results, because the parser does not cope well with the nested ifs, and we end up with emails discarded because the next rule was not processed correclty.
Sample sieve script:
turned into this by Roundcube when I change the name of the first rule to Abwesenheit2:
We already had quite some data loss.
We have now deleted all the old scripts, but for other customers we still need to migrate, and for other users of Roundcube it would be better to have a clean solution.
The text was updated successfully, but these errors were encountered: