[Dovecot] sievec fails when last line is a comment without trailing \n
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@adpm.de
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.
Hi,
On Sunday, 4. October 2009, Stephan Bosch wrote:
Peter Marschall wrote:
[.. comment as last line in sieve files ... ]
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.
Thanks for this fix and for sieve! Peter
-- Peter Marschall peter@adpm.de
participants (2)
-
Peter Marschall
-
Stephan Bosch