[Dovecot] sievec fails when last line is a comment without trailing \n
Stephan Bosch
stephan at rename-it.nl
Mon Oct 5 00:19:46 EEST 2009
Peter Marschall wrote:
> 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.
>
Good suggestion:
http://hg.rename-it.nl/dovecot-1.2-sieve/rev/3c3984419921
It now triggers a warning in stead of an error.
Regards,
Stephan.
More information about the dovecot
mailing list