[Dovecot] sievec fails when last line is a comment without trailing \n

Peter Marschall peter at adpm.de
Fri Oct 2 19:12:59 EEST 2009


Hi,

when switching from Dovecot 1.1 + cmusieve to Dovecot 1.2 + sieve
I stumbled upon the following problem:

My sieve files, generated with Dovecot 1.1's managesieve, did not
compile anymore with sieve's sievec.
The error message was: 
	error: end of file before end of hash comment.

Looking a bit closer I found that the last line, which was a comment,
did not have a trailing newline.
Adding a newline fixed the problem.

I do not know if Dovecot 1.2's managesieve behaves differently,
but the upgrade from cmusieve to sieve 

In the spirit of "be generous in what you accept but strict in what you send",
is it possible for sievec to not throw an error in this case,
but simply compile the file.

This might help other updates from cmusieve -> sieve as well.

Thanks in advance.
Peter

-- 
Peter Marschall
peter at adpm.de


More information about the dovecot mailing list