[Dovecot] Dovecot-sieve processing optimizations

Roderick A. Anderson raanders at acm.org
Wed Oct 8 22:26:15 EEST 2008


Eduardo M KALINOWSKI wrote:
> Seth Mattinen escreveu:

<snip />

Seth, Eduardo;

Thanks.

Seth,

As I read your post -- slap went my hand to my forehead.  I knew that! 
That was the subconsciouses reason I asked I'm sure.  :-)

Eduardo,

You're right.  What I'm doing, currently, isn't all that complicated. 
In fact mail sieve will make it easier, simpler, and cleaner to do.  I 
only once really got into doing anything complex using procmail and I'm 
not using it now.


Again thanks to you both,
Rod
-- 

>>>     
>> Well, both accomplish different things. In the first example, one and
>> only one of the conditions will be executed. In the second one, more
>> than one could possibly be executed.
>>
>> I've never looked at Sieve's code, but the first will stop at the first
>> matching condition. In the second case, because you could make it do
>> more than one thing, it must check each condition.
>>   
> 
> If in each if you put a "finish" statement (or whatever is used to stop
> processing the file), then the second one can be more efficient, since
> it does not have to continue checking the file to see if there are
> further conditions after the if/elseif/.../else block.
> 
> But in practice I doubt there is a practical difference between both.
> You should use the one that is more readable for you.
> 



More information about the dovecot mailing list