[Tickets #348] NEW: Add new Ingo action (keep and file to folder)

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Jul 1 10:48:21 PDT 2004


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

-Ticket 348
-Queue: Ingo
-Created By: 


>From kevin_myer at iu13.org (Thu Jul  1 10:48:21 2004):
This patch implements an additional Ingo Action.  There was no option to
keep a copy of a message in my INBOX and file it into a folder.  I use this
action so that certain important messages (such as CERT advisories) make it
to my INBOX, where I see them, and are also filed into a CERT folder for
historical reference.

Tested and works against Sieve for CMU IMAPd server.  Probably would work
with other filter backends but haven't bothered to test there since I don't
use them.

--- lib/Storage.php.old Mon Jun 28 13:05:02 2004
+++ lib/Storage.php     Mon Jun 28 13:11:54 2004
@@ -16,6 +16,7 @@
 /** @const INGO_STORAGE_ACTION_VACATION */    
define('INGO_STORAGE_ACTION_VACATION', 8);
 /** @const INGO_STORAGE_ACTION_WHITELIST */   
define('INGO_STORAGE_ACTION_WHITELIST', 9);
 /** @const INGO_STORAGE_ACTION_FORWARD */     
define('INGO_STORAGE_ACTION_FORWARD', 10);
+/** @const INGO_STORAGE_ACTION_MOVEKEEP */    
define('INGO_STORAGE_ACTION_MOVEKEEP', 11);
                                                                            
   
 // Ingo_Storage:: 'flags' constants
 /** @const INGO_STORAGE_FLAG_ANSWERED */
define('INGO_STORAGE_FLAG_ANSWERED', 1);
@@ -305,6 +306,12 @@
             $ob->flags = true;
             break;
                                                                            
   
+       case INGO_STORAGE_ACTION_MOVEKEEP:
+           $ob->label = _("Deliver into my INBOX and copy to");
+           $ob->type = 'folder';
+           $ob->flags = true;
+           break;
+
         case INGO_STORAGE_ACTION_REJECT:
             $ob->label = _("Reject with reason");
             break;
--- lib/Script/sieve.php.old    Mon Mar 15 17:44:14 2004
+++ lib/Script/sieve.php        Mon Jun 28 13:13:32 2004
@@ -25,6 +25,7 @@
         INGO_STORAGE_ACTION_DISCARD,
         INGO_STORAGE_ACTION_REDIRECT,
         INGO_STORAGE_ACTION_REDIRECTKEEP,
+       INGO_STORAGE_ACTION_MOVEKEEP,
         INGO_STORAGE_ACTION_REJECT
     );
                                                                            
   
@@ -414,6 +415,11 @@
                 $action[] = &new Sieve_Action_Keep();
                 break;
                                                                            
   
+           case INGO_STORAGE_ACTION_MOVEKEEP:
+               $action[] = &new Sieve_Action_Keep();
+               $action[] = @new Sieve_Action_Fileinto(array('folder' =>
$filter['action-value']));
+               break;
+
             case INGO_STORAGE_ACTION_WHITELIST:
                 foreach ($whitelistBlocks as $white) {
                     $this->addBlock($white);





http://bugs.horde.org/details.php?id=348

-- 


More information about the bugs mailing list