[Dovecot] recover .sieve plaintext from .sievec binary file

Stephan Bosch stephan at rename-it.nl
Tue Jul 10 01:00:05 EEST 2012

On 7/9/2012 10:53 PM, Florin Andrei wrote:
> On 07/09/2012 01:46 PM, Pascal Volk wrote:
>> On 07/09/2012 10:28 PM Florin Andrei wrote:
>>>>>> By mistake, I deleted the .sieve plaintext file with all the Sieve
>>> filters, but I still do have the .sievec compiled binary. Is there any
>>> way to dump the binary file back into plaintext format? Keep in mind,
>>> I'm running v2 now, and the binary was made on a v1 Dovecot server.
>> You could try to recover your scripts using sieve-dump(1):
>> http://pigeonhole.dovecot.org/doc/man1/sieve-dump.1.html
> $ sieve-dump .dovecot.sievec
> sieve-dump(florin): Error: sieve: binary_open: binary .dovecot.sievec 
> has corrupted header (0x53727943) or it is not a Sieve binary
> sieve-dump(florin): Error: failed to load binary: .dovecot.sievec

That is not going to work. That binary is produced by the old cmusieve 
plugin. You'll need the old sieved tool to dump the binary.

And then you still have a problem. The sieved tool does not reconstruct 
the sieve script that was used to create it; it produces an 
assembly-like output from the byte code. You'd have to manually 
translate that back to Sieve. :/



More information about the dovecot mailing list