[Dovecot] Manual manipulation of Sieve files

email builder emailbuilder88 at yahoo.com
Fri Jun 22 10:32:12 EEST 2012


Thanks for the reply --



>>  We have some scripts that take care of some tasks when creating new email 
> accounts, such as creating some default mail filter rules.
>> 
>>  I know Sieve scripts are plain text files, but need to be compiled for 
>> use.  I see that you can use seivec to compile scripts manually, which can help 
>> me create .dovecot.svbin which can be placed where needed and permissioned 
>> correctly.  But a couple questions:
>> 
>>  * Sieve has the concept of an active script - is this merely whatever is 
>> compiled into the .dovecot.svbin file?
> 
> This is the script file that the sieve= setting points to. The term 
> 'active' only has real meaning when ManageSieve is used. Then, the 
> active script file is a symbolic link that points into the sieve_dir= directory, 
> thereby selecting which script is active.
> 
>>  * Does dovecot (managesieve) do any other housekeeping when a user sieve 
>> script is installed and set as the active script?  I would need to replicate 
>> this manually.
> 
> It makes the symbolic link. Compiling the script is done automatically when the 
> script is first executed at delivery.
> 
>>  * If the default script is always the same (sorry, for us, the solution 
>> isn't global scripts), would it work to compile that script once, keep the 
>> compiled version somewhere and merely copy it into the correct place for a new 
>> user?  Are there issues with this?
>
> You can pre-compile it, but the plaintext script must also exist at the 
> indicated location. Sieve always looks for the plaintext script and only when 
> that is found it checks for the presence of an earlier compiled binary.

Oh, so it's even easier.  Our setup script can just put the plain text sieve
script in the right place, create the .dovecot.sieve symlink and that's enough?
Pasting in a precompiled would save a few CPU cycles upon first delivery?

Great, thanks again.




More information about the dovecot mailing list