[#7343] Destination rule (To,Cc,Bcc,etc) doesn't work with the IMAP backend
Summary Destination rule (To,Cc,Bcc,etc) doesn't work with the IMAP backend
Queue Ingo
Queue Version 1.2.1
Type Bug
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester falon (at) csi (dot) it
Created 09/16/08 (548 days ago)
Due
Updated 01/12/10 (65 days ago)
Assigned 12/22/09 (86 days ago)
Resolved 12/30/09 (78 days ago)
Attachments
Milestone 1.2.4
Patch No

History
01/12/10 CVS Commit Comment #22 Reply to this comment
01/12/10 CVS Commit Comment #21 Reply to this comment
12/30/09 CVS Commit Comment #20 Reply to this comment
12/30/09 Jan Schneider Comment #19
State ⇒ Resolved
Reply to this comment
Works fine for me now.
12/30/09 CVS Commit Comment #18 Reply to this comment
Changes have been made in CVS for this ticket:

Fix argument order (Bug #7343).
http://cvs.horde.org/diff.php/ingo/lib/Script/imap.php?rt=horde&r1=1.49.10.20&r2=1.49.10.21&ty=u
12/28/09 rene (dot) plattner (at) uibk (dot) ac (dot) at Comment #17 Reply to this comment
May be it is this bug, because i noticed the same problem with the 
Destination rule.

http://bugs.horde.org/ticket/8804
12/23/09 falon (at) csi (dot) it Comment #16 Reply to this comment
Thanks. I applied the new file.
It work at the same way of previous one, for me.
Source,Destination,Participant category are not filtered.
12/23/09 Jan Schneider Comment #15 Reply to this comment
12/23/09 falon (at) csi (dot) it Comment #14 Reply to this comment
You can't use code from Git with the stable version. Use the patch 
for the FRAMEWORK_3 CVS branch instead.
I tried but I can't.
Diff file is rejected.
  My imap.php 1.2.4 original is
$Horde: ingo/lib/Script/imap.php,v 1.49.10.18 2009/01/06 15:24:37 jan Exp $

I tried also with 1.2.5, same result: I can't patch:

[root@ Script]# patch -p1 < imap.php.diff
missing header for unified diff at line 8 of patch
can't find file to patch at input line 8
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|===================================================================
|RCS file: /horde/cvs/ingo/lib/Script/imap.php,v
|retrieving revision 1.49.10.19
|retrieving revision 1.49.10.20
|diff -p --unified=3 -r1.49.10.19 -r1.49.10.20
|--- imap.php   2009/12/21 23:19:05     1.49.10.19
|+++ imap.php   2009/12/22 13:29:47     1.49.10.20
--------------------------
File to patch: imap.php
patching file imap.php
Hunk #3 FAILED at 158.
Hunk #4 FAILED at 205.
Hunk #5 succeeded at 228 (offset 6 lines).
12/23/09 Jan Schneider Comment #13 Reply to this comment
You can't use code from Git with the stable version. Use the patch for 
the FRAMEWORK_3 CVS branch instead.
12/23/09 falon (at) csi (dot) it Comment #12 Reply to this comment
I tried in horde-webmail-1.2.5 replacing file from Git.
I see blank page after login, and these errors in http log:

[Wed Dec 23 13:51:24 2009] [error] PHP Fatal error:  Access level to 
Ingo_Script_Imap::$_actions must be public (as in class Ingo_Script) 
in /var/www/html/horde-webmail-1.2.5/ingo/lib/Script/imap.php on line 
381, referer: https://10.10.10.10/imp/login.php
12/22/09 CVS Commit Comment #11 Reply to this comment
12/22/09 Jan Schneider Comment #10
Milestone ⇒ 1.2.4
State ⇒ Feedback
Taken from Horde DevelopersHorde Developers
Assigned to Jan Schneider
Reply to this comment
Please try what I committed.
12/22/09 CVS Commit Comment #9 Reply to this comment
03/18/09 jouva (at) moufette (dot) com Comment #8 Reply to this comment
Is this still being looked at?
11/11/08 jouva (at) moufette (dot) com Comment #7 Reply to this comment
I noticed two things related to this.



1) It even affects uncommon headers such as Bcc since it calls 
extendedSearch which doesn't seem to work.

2) It's not specific to Destination rule because it's simply not 
separating the values. So it's looking for a field named 
"To,Cc,Bcc..." with the commas and all field names in there.



The point at which it fails seems to be quite possibly the "php 
search" section of the filtering. Either way, it hits extendedSearch 
in all cases that it failed for me. But regardless of what needs to be 
done with that to make extended searching work, it needs to deal with 
the comma separated field names
11/11/08 Chuck Hagenbuch Summary ⇒ Destination rule (To,Cc,Bcc,etc) doesn't work with the IMAP backend
 
11/11/08 Chuck Hagenbuch State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
11/11/08 falon (at) csi (dot) it Comment #6 Reply to this comment
Duplicate of ticket #7117.
I would only notice that is not really a "duplicate".

maildrop and procmail was patched. IMAP was not patched...


09/17/08 falon (at) csi (dot) it Comment #5 Reply to this comment
I use imap script as backend.



$backends['imap'] = array(

     'driver' => 'null',

     'preferred' => '',

     'hordeauth' => true,

     'params' => array(),

     'script' => 'imap',

     'scriptparams' => array(),

     'shares' => false

);



This is what is stored to mysql:



{i:0;a:4:{s:5:"field";s:19:"To,Cc,Bcc,Resent-to";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:25:"dummy-users@dummy.org";}}s:12:"action-value";s:12:"dummy-user";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}}



Same behavior also fot other combined header rules, as:

{i:0;a:4:{s:5:"field";s:52:"To,Cc,Bcc,Resent-to,From,Sender,Reply-to,Resent-from";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:25:"dummy-users@dummy.org";}}s:12:"action-value";s:12:"dummy-user";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}}



These filters don't apply.



If it is the same problem of procmail I apologize for duplication case.
09/16/08 Jan Schneider Comment #4
State ⇒ Duplicate
Reply to this comment
Duplicate of ticket #7117.
09/16/08 arjen+horde (at) de-korte (dot) org Comment #3 Reply to this comment
What ingo backend?
I (not the initial reporter) have this problem with the procmail 
backend. It generates the following



##### Test #####

:0

* ^To,Cc,Bcc,Resent-to:.*test@example\.com

"$DEFAULT/.Test/"



I doubt this will do what it is intended to do.
09/16/08 Matt Selsky Comment #2
State ⇒ Feedback
Reply to this comment
What ingo backend?
09/16/08 falon (at) csi (dot) it Comment #1
State ⇒ Unconfirmed
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Destination rule (To,Cc,Bcc,etc) doesn't work
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
I notice that "destination (To,Cc,Bcc,etc)" rule of last Ingo 
H3(1.2.1) doesn't work. Messages are not filtered.

I have to create separate rule for each header (To,Cc,Bcc) to make 
filter working.

I use IMP H3 (4.2), configured with an IMAP server as backend.



Thank you very much for every hints or patch