6.0.0-beta1
7/28/25

[#5014] ingo and an or filters are only partially working
Summary ingo and an or filters are only partially working
Queue Ingo
Queue Version 1.1.2
Type Bug
State Duplicate
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester bennettj (at) johnbennettservices (dot) com
Created 02/19/2007 (6734 days ago)
Due
Updated 03/14/2007 (6711 days ago)
Assigned 03/02/2007 (6723 days ago)
Resolved 03/14/2007 (6711 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/14/2007 06:14:52 PM Michael Slusarz Comment #6
State ⇒ Duplicate
Reply to this comment
Duplicate of Bug 4618.
03/14/2007 11:19:04 AM lgomez (at) encamina (dot) com Comment #5 Reply to this comment
Lo siento pero no hablo inglés.

Creo que he encontrado una posible solución.

En el fichero "ingo\lib\Script\imap.php" hay que cambiar el código:



        case INGO_STORAGE_ACTION_KEEP:

        case INGO_STORAGE_ACTION_MOVE:

        case INGO_STORAGE_ACTION_DISCARD:



         -       $search_array[] = &$ob;

        +       $search_array[] = $ob;



Espero vuestros comentarios.

Gracias.



-----------------------------------------------------



I am sorry, but I don't speak English.

I believe that I have found a possible solution.

In the file "ingo\lib\Script\imap.php" it is necessary to change the code:



        case INGO_STORAGE_ACTION_KEEP:

        case INGO_STORAGE_ACTION_MOVE:

        case INGO_STORAGE_ACTION_DISCARD:



        -        $search_array[] = &$ob;

        +       $search_array[] = $ob;



I wait for your commentaries.

Thank you.
03/02/2007 09:12:42 PM bennettj (at) johnbennettservices (dot) com Comment #4 Reply to this comment
Thanks, I will get the RC and test it out.
03/02/2007 08:30:16 PM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
Duplicate of Bug 5054?
03/02/2007 02:54:29 AM bennettj (at) johnbennettservices (dot) com Comment #2
New Attachment: ingo_mysql_filters.txt Download
Reply to this comment
I have been able to install the horde 3.0.x components and can verify 
that the an and or rules do work properly.  I created an an rule that 
stated if subject contained hi and bye to move to a folder.  I created 
an or rule that stated if from contained user2 or user3 move to a 
folder.  Sent email with subject of hi and, which wasn't filtered, 
sent email with hi and bye, and it was filtered.  Sent email from 
user2, user3, and user4 and only mail from user2 and user3 were 
filtered.



ingo conf.php

<?php

/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */

// $Horde: ingo/config/conf.xml,v 1.13 2004/02/11 19:24:23 slusarz Exp $

$conf['menu']['apps'] = array('accounts', 'imp', 'ingo', 'kronolith', 
'mnemo', 'nag', 'turba', 'gollem');

$conf['storage']['driver'] = 'prefs';

$conf['storage']['maxblacklist'] = 0;

$conf['storage']['maxwhitelist'] = 0;

$conf['rules']['userheader'] = true;

$conf['rules']['usefolderapi'] = true;

/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */



ingo backends.php

/* IMAP Example */

$backends['imap'] = array(

     'driver' => 'null',

     'preferred' => 'mail.thebennetthome2.com',

     'hordeauth' => true,

     'params' => array(),

     'script' => 'imap',

     'scriptparams' => array()

);



If I can provide any more detail, please let me know.


02/21/2007 11:54:53 PM Jan Schneider Assigned to Michael Slusarz
State ⇒ Assigned
 
02/19/2007 09:58:17 PM bennettj (at) johnbennettservices (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ ingo and an or filters are only partially working
Queue ⇒ Ingo
New Attachment: ingo_filters.txt Download
State ⇒ Unconfirmed
Reply to this comment
Sorry for the lame summary.  When using ingo and setting an or rule, 
only the last item in the list is being executed.  I have created a 
rule that states if from contains user2 or from contains user3 or from 
contains user4 deliver to folder junkmail, stop checking if this rule 
matches.  When sending mail from user 2, 3, and 4, only the mail from 
user 4 gets moved to the junkmail folder.  If  you switch the order 
around, then the last item in the list will get executed.



When using an and rule, the rule will execute if your ands are 
matched, but will also execute on the last item in the list as well.   
I have a rule that states if subject contains one and subject contains 
2 deliver to folder trash, stop checking if this rule matches.  Email 
with the word one doesn't get moved, this is correct.  Email with one 
and two in the subject get moved, this is correct.   Email with two in 
the subject get moved, this is incorrect.



ingo conf.php:

/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */

// $Horde: ingo/config/conf.xml,v 1.13 2004/02/11 19:24:23 slusarz Exp $

include '/home/httpd/html/horde/conf.menu.apps.php';

$conf['storage']['driver'] = 'prefs';

$conf['storage']['maxblacklist'] = 0;

$conf['storage']['maxwhitelist'] = 0;

$conf['rules']['userheader'] = true;

$conf['rules']['usefolderapi'] = true;

/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */



ingo backends.php:

/* IMAP Example */

$backends['imap'] = array(

     'driver' => 'null',

     'preferred' => 'mail.formytest.com',

     'hordeauth' => true,

     'params' => array(),

     'script' => 'imap',

     'scriptparams' => array()

);



I also tried driver = vfs, but I don't know enough about the vfs 
driver to know if there would be more that would be needed.



A copy of my ingo filter statements from the horde_prefs table is attached.



I am actually running this on SME Server 7.1, with is based on CentOs 
4.4.  I have duplicated this on three separate test installs.  Please 
let me know what other information I can give to you.



Thanks,



John Bennett




Saved Queries