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

2012-07-09 Thread Pascal Volk
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


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.1219...@localdomain.org


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

2012-07-09 Thread Florin Andrei

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

--
Florin Andrei
http://florin.myip.org/




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

2012-07-09 Thread Stephan Bosch

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. :/


Regards,

Stephan.




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

2012-07-09 Thread Florin Andrei

On 07/09/2012 03:00 PM, Stephan Bosch wrote:


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. :/


Looks like I'll have to rebuild that file by hand. :(

--
Florin Andrei
http://florin.myip.org/