6.0.0-alpha14
7/2/25

[#13031] Filters will not apply if more then one entry is in list
Summary Filters will not apply if more then one entry is in list
Queue Ingo
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester oneumyvakin (at) parallels (dot) com
Created 03/11/2014 (4131 days ago)
Due
Updated 03/23/2014 (4119 days ago)
Assigned 03/21/2014 (4121 days ago)
Resolved 03/23/2014 (4119 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/23/2014 07:00:02 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 8a58c402595dec789193b6146ec43ebd43ff7c4a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Mar 23 00:58:50 2014 -0600

     [mms] Fix blacklist/whitelist matching with IMAP backend (Bug #13031).

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

  ingo/docs/CHANGES        |    1 +
  ingo/lib/Script/Imap.php |   20 +++++++++++++++-----
  ingo/package.xml         |    1 +
  3 files changed, 17 insertions(+), 5 deletions(-)

http://git.horde.org/horde-git/-/commit/8a58c402595dec789193b6146ec43ebd43ff7c4a
03/23/2014 06:59:19 AM Michael Slusarz Comment #4
State ⇒ Resolved
Reply to this comment
Ingo 3.1.5
03/23/2014 06:59:03 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_1):

commit 8a4263e4f2b389635c6d1e6fe2af3e5644a27fab
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Mar 23 00:58:50 2014 -0600

     [mms] Fix blacklist/whitelist matching with IMAP backend (Bug #13031).

  ingo/docs/CHANGES        |    1 +
  ingo/lib/Script/Imap.php |   20 +++++++++++++++-----
  ingo/package.xml         |    2 ++
  3 files changed, 18 insertions(+), 5 deletions(-)

http://git.horde.org/horde-git/-/commit/8a4263e4f2b389635c6d1e6fe2af3e5644a27fab
03/21/2014 12:27:10 PM Jan Schneider Assigned to Michael Slusarz
State ⇒ Assigned
 
03/19/2014 12:51:16 PM jussi (dot) hanninen (at) anvia (dot) fi Comment #2 Reply to this comment
Try this:

<                     if (!$v->getEnvelope()->from->match($addr)) {
<                         $indices = array_diff($indices, 
array($v->getUid()));
<                     }
---

[Show Quoted Text - 10 lines]

[Show Quoted Text - 33 lines]
03/11/2014 10:41:54 AM oneumyvakin (at) parallels (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Filters will not apply if more then one entry is in list
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
===STEPS TO REPRODUCE===
1. Login to Horde
2. Add one email address to "Mail > Filters > Blacklist"
3. Activate "Preferences > Mail > Filters > 'Apply filter rules upon 
logging on' and 'Apply filter rules whenever Inbox is displayed'"
4. Send email from the same mail address which is in blacklist. Filter 
will work correctly.
5. Now add one more entry to "Mail > Filters > Blacklist" and activate 
the same in step 3.
6. Now send mails with any of the mail address which is in blacklist. 
Filters will not apply for any entry.

===ACTUAL RESULT===

Filters will not apply if more than one entry is in Blacklist filter.

===EXPECTED RESULT===

Filters should apply correctly for all entries in Blacklist filter.

===ROOT CAUSE===

As I understand the issue happens because by some logic matched 
messages are removed from list which for filter should be applied at:

\horde\ingo\lib\Script\Imap.php line 158:

                 foreach ($msgs as $v) {
                     if (!$v->getEnvelope()->from->match($addr)) {
                         $indices = array_diff($indices, array($v->getUid()));
                     }
                 }

Saved Queries