[ingo] Re: [imp] Sieve app gets made more usable...

Mike Cochrane mike@graftonhall.co.nz
Sat, 21 Sep 2002 14:18:42 +1200


Well yes and no... the problem is that most scripts have elsifs in them and the
ingo storage systems doesn't allow for these. if we were importing the following
simple script you can see quickly what's going to happen.

if (a) {
  x;
} elsif (b) {
  y;
} else {
  z;
}

if {c) {
  l;
} else {
  m;
}

the way this would be stored and outputed by ingo is:
if (allof(a, c)) {
 x;
 l;
 stop;
}

if (allof(a, !c) {
 x;
 m;
 stop;
} 

if (allof(!a, b, c)) {
 y;
 l;
 stop;
}

if (allof(!a, b, !c)) {
 y;
 m;
 stop;
}

you get the idea... it goes on for a bunch more... 

So yes it is possible to import any script but it just gets too ugly and
writting ingo was the first time i'd every touched sieve scripts so i didn't
have any existing ones to worry about. Feel free to implement this feature if
you wish, it would be a welcomed patch.

Also if you're using timsieved then the scripts aren't deleted, unless the
script was called 'ingo'. Ingo created a script named 'ingo' and sets it
active.. i doesn't remove any existing scripts.

- Mike :-)

> ----- Message from adrieder@sbox.tugraz.at ---------
> 
> Hi,
> 
> is there a way to import already existing sieve-scripts into the database
> of horde? Because otherwise the existing scripts are not shown and deleted
> when a user wants to add/change a rule.
> 
> Thanks
> 
> 	Didi