Problem in Pigeonhole sievec

Steffen Kaiser skdovecot at inf.h-brs.de
Mon May 28 14:55:46 EEST 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 28 May 2018, Thorsten Hater wrote:

> I stumbled upon the following behaviour of Pigeonhole, which I consider
> to be problematic. A user deployed a Sieve script similar to the following
> snippet
>
> if not anyof (address :is ["from","cc"] ["...", ..., "... at ...
> GARBAGE", ...] {
>  fileinto "inbox.Trash";
>  stop;
> }
>
> Note the extra line break before GARBAGE. This script is obviously broken,
> but gets accepted by sievec and only fails later, at runtime with
>
> line X: error: found stray carriage-return (CR) character in quoted
>    string started at line X.
>
> So, the question is whether line breaks in strings are allowed in general
> and the runtime error is unavoidable, or should sievec return an error?

https://www.ietf.org/rfc/rfc3028.txt first hit of quoted-string

  quoted-string = DQUOTE *CHAR DQUOTE
            ;; in general, \ CHAR inside a string maps to CHAR
            ;; so \" maps to " and \\ maps to \
            ;; note that newlines and other characters are all allowed
            ;; strings

So, it's correct. But the address should reject the CR. I guess, 
Pigeonhole triggers the error for sanity purpose?

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWwvuQsQnQQNheMxiAQILoAgAyRjSObVJkrAmxzyLau9gIvvMOM2R++HP
pwsptIQ72xoYJOO/Lnd1TmfKTE9QYwtOGkSKr8tiJVD8JOpL5fUbB6mZNOTXkAv0
TOW2gA7v06nXq6K0ETum8anoKTIF0o4j5aQJ5yQ5CrzlVQqUwTsf4mVVNqK0hn/L
X5RAuCVQyx6sdvCB+lSOGmLv/fT8+xHS03U6jzCp/Yov5OKsT29oOOF6dXWR49Iw
BL+DOd9T37hHF6ENp4A5wxX6iCMKLsWL0f5xTcxwRK5GOiCDoUH6ZpiywD0PtCuT
VlusmbIByGON7foNlCPusTVcfq8GenMhOrgFcbp1PfRrShIQgsjWSg==
=vgR1
-----END PGP SIGNATURE-----


More information about the dovecot mailing list