6.0.0-alpha14
7/3/25

[#12938] Wrong Sieve implementation of "Do not send responses to bulk or list messages"
Summary Wrong Sieve implementation of "Do not send responses to bulk or list messages"
Queue Ingo
Queue Version 3.1.3
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de
Created 01/27/2014 (4175 days ago)
Due
Updated 01/30/2014 (4172 days ago)
Assigned
Resolved 01/30/2014 (4172 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/30/2014 07:53:39 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit d9a2b4bc7e28c6a87068b0878e5b9a8eae309bfe
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Jan 30 12:49:10 2014 -0700

     [mms] Fix sieve driver correctly identifying mailing list when 
determining whether to send vacation messages (Bug #12938
skhorde@smail.inf.fg-bonn-rhein-sieg.de).

     Conflicts:
             ingo/docs/CHANGES
             ingo/package.xml

  ingo/docs/CHANGES         |    9 +++++++++
  ingo/lib/Script/Sieve.php |    7 +++++--
  ingo/package.xml          |   13 +++++++++++++
  3 files changed, 27 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/d9a2b4bc7e28c6a87068b0878e5b9a8eae309bfe
01/30/2014 07:52:34 PM Michael Slusarz Comment #4
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
Ingo 3.1.4.
01/30/2014 07:50:20 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_1):

commit 7d71388506ef92c0413f77e609936584b39dfa0c
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Jan 30 12:49:10 2014 -0700

     [mms] Fix sieve driver correctly identifying mailing list when 
determining whether to send vacation messages (Bug #12938
skhorde@smail.inf.fg-bonn-rhein-sieg.de).

  ingo/docs/CHANGES         |    3 +++
  ingo/lib/Script/Sieve.php |    7 +++++--
  ingo/package.xml          |    4 ++--
  3 files changed, 10 insertions(+), 4 deletions(-)

http://git.horde.org/horde-git/-/commit/7d71388506ef92c0413f77e609936584b39dfa0c
01/30/2014 09:01:32 AM skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de Comment #2 Reply to this comment
This patch makes the script works for one or more of the list headers 
instead of all of them:

--- ingo/lib/Script/Sieve.php.orig      2014-01-30 09:47:50.000000000 +0100
+++ ingo/lib/Script/Sieve.php   2014-01-30 09:52:16.000000000 +0100
@@ -337,4 +337,8 @@
              $headers['Mailing-List'] = null;
-            $tmp = new Ingo_Script_Sieve_Test_Exists(array('headers' 
=> implode("\n", array_keys($headers))));
+               foreach($headers as $header => $dummy) {
+                   $tmp = new 
Ingo_Script_Sieve_Test_Exists(array('headers' => $header));
              $tests[] = new Ingo_Script_Sieve_Test_Not($tmp);
+               }
+#            $tmp = new Ingo_Script_Sieve_Test_Exists(array('headers' 
=> implode("\n", array_keys($headers))));
+#            $tests[] = new Ingo_Script_Sieve_Test_Not($tmp);
              $vals = array('headers' => 'Precedence',

01/27/2014 08:29:16 AM skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Wrong Sieve implementation of "Do not send responses to bulk or list messages"
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
This script is generated, if you check "Do not send responses to bulk 
or list messages".

  1: # Sieve Filter
     2: # Generated by Ingo (http://www.horde.org/apps/ingo/
(01/27/2014, 09:23)
     3: require ["vacation", "regex"];
     4: # Vacation
     5: if allof ( not exists ["list-help", "list-unsubscribe", 
"list-subscribe", "list-owner", "list-post", "list-archive", 
"list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" 
:is "Precedence" ["list", "bulk", "junk"], not header :comparator 
"i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {
     6:     vacation :days 7 :addresses "/dev/null@example.com" 
:subject "Test" "Test 1";
     7: }

RFC 5228 sec. 5.5 explains, that "All of the headers must exist or the 
test is false". Hence, if one of the enumerated headers is missing in 
the exists clause, e.g. "Mailing-List", the "not exists" is false. 
E.g. the messages of the Horde list to not contain a "Mailing-List" 
header.

I would suggest to change the condition to:

anyof ( not exists "list-help", not exists "list-unsubscribe", not 
exists "list-subscribe", ...

Saved Queries