[Tickets #13031] Re: Filters will not apply if more then one entry is in list

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Mar 19 12:51:16 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/13031
------------------------------------------------------------------------------
  Ticket             | 13031
  Updated By         | jussi.hanninen at anvia.fi
  Summary            | Filters will not apply if more then one entry is in
                     | list
  Queue              | Ingo
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


jussi.hanninen at anvia.fi (2014-03-19 12:51) wrote:

Try this:

<                     if (!$v->getEnvelope()->from->match($addr)) {
<                         $indices = array_diff($indices,  
array($v->getUid()));
<                     }
---
>  			$f=true;
>  			foreach ($addr as $a) {
>                      	if ($v->getEnvelope()->from->match($a)) {
>  					$f=false;
>  				}
>                      }
>  			if($f) {
>                          	$indices = array_diff($indices,  
> array($v->getUid()));
>  			}


> ===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()));
>                     }
>                 }
>






More information about the bugs mailing list