From b2c5869fe24eff81a92bc233bfef374bdb7afc31 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 02 Aug 2013 03:22:31 -0400
Subject: [PATCH] Skip optional :all modified in address/envelope rule

---
 plugins/managesieve/lib/Roundcube/rcube_sieve_script.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
index a614c3b..371b45d 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
@@ -260,7 +260,8 @@
                             $this->add_index($test, $tests[$i], $exts);
                         }
 
-                        if (!empty($test['part'])) {
+                        // :all address-part is optional, skip it
+                        if (!empty($test['part']) && $test['part'] != 'all') {
                             $tests[$i] .= ' :' . $test['part'];
                             if ($test['part'] == 'user' || $test['part'] == 'detail') {
                                 array_push($exts, 'subaddress');

--
Gitblit v1.9.1