Open tacruc opened 4 years ago
@tacruc With your fix, putscript works?
Yes, but I only tested it against the sieve server of mailbox.org and have no broader background of how or why it works. It was just a good guess.
Note: the parser isn't really set up to work with CRLF linebreaks, so if the getscript
behavior is changed, the parser might break. I particularly noticed this with multi-line strings (parser only recognized them if they end on .\n
, but with CRLF they would end on .\r\n
), but there might be other issues.
It might be a quicker fix to make putscript
just convert newlines back to CRLF automatically.
Addendum: since the Sieve spec is pretty clear about only allowing \r\n
linebreaks, I think the best way to comply would be to never convert it to Unix linebreaks to begin with. But this might require some non-trivial changes to the parser.
Thanks for the nice library. Saved me some time in creating sieve scripts to handle my emails.
I had the follwing issue
Was not working c.havespace returned true, but putscript failed. The Problem was solved by
Therefore I'm wondering if this should be fixed in the library or if there is a good reason for this behavior.