dburkart / check-sieve

Syntax checker for mail sieves.
MIT License
35 stars 7 forks source link

Implement RFC 6134 Sieve Extension: Externally Stored Lists #57

Closed johnlettman closed 1 year ago

johnlettman commented 1 year ago

[!IMPORTANT] The change is blocked by a unique grammar element for multi-line strings missing from the Bison declarations. See: https://github.com/dburkart/check-sieve/issues/55#issuecomment-1703683448

This change implements support for RFC 6134 Sieve Extension: Externally Stored Lists, closing #55. The RFC introduces the following elements:

johnlettman commented 1 year ago

GitHub didn't link the issue, so adding this: Fixes #55

Edit: nevermind, still doesn't work.

dburkart commented 1 year ago

We should actually support these weird strings (you can see the rules in the flex file). But I wouldn't be surprised if something is broken, as I'm sure most people don't use this syntax in their sieves.

I'll look into it.

dburkart commented 1 year ago

@johnlettman This is actually a bug in the example you got from RFC 6134. As per RFC 5228, multi-line strings begin with "text:", not ":text" (the latter of which is a tag, which would be something else). The relevent section of RFC 5228 is:

For entering larger amounts of text, such as an email message, a multi-line form is allowed. It starts with the keyword "text:", followed by a CRLF, and ends with the sequence of a CRLF, a single period, and another CRLF. The CRLF before the final period is considered part of the value.

Changing that, and the indentation of your test makes it pass. I've pushed it up to your branch (since it was fiddly).

johnlettman commented 1 year ago

Ah! Good catch. I must have glanced over the colon placement when looking that up. The changes LGTM thanks!

johnlettman commented 1 year ago

I'll also add in the README and manpage references quick, one sec..