script for regenerate and activate all filters

Jason Keltz <[email protected]>
Newsgroups gmane.comp.horde.devel
Message-ID <[email protected]>
Hi.

I hope I'm writing to the right list.    I'm switching our mail format 
from mbox to maildir, and I need to regenerate the Ingo procmail filters 
on my system.  I'm close coming up with a basic script to do this, but 
having some trouble, and hoping for some advice..

This part is fine..

#!/usr/bin/php
<?php

@define('HORDE_BASE', '/local/horde');

set_include_path(get_include_path() . PATH_SEPARATOR . HORDE_BASE . 
"/pear/php");

require_once HORDE_BASE . '/lib/Application.php';

Horde_Registry::appInit('ingo', array('cli' => true));

$user="jas";

   echo "$user";
   $registry->setAuth($user, array());
   $session->set('ingo', 'current_share', ':' . $user);
   $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
print_r($ingo_storage->retrieve(Ingo_Storage::ACTION_WHITELIST)->getWhitelist());

   ^--- since this prints my whitelist, I know I'm close...

  I expected I'd be able to generate the script something like this:

   $ingo_script = 
$injector->getInstance('Ingo_Factory_Script')->createAll();
   $script = $ingo_script->generate();
  print_r($script);  <---- but this doesn't look like the procmail script...

And I know there's a command to activate the script afterwards.. what 
would that be?

   Ingo_Script_Util::activate($ingo_script->generate()); <--- something 
like that?

Thanks,

Jason.
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.