ietf-mta-filters
[Top] [All Lists]

Re: Sieve base-spec revision I-D

2005-02-16 01:43:05

On Tue, Feb 15, 2005 at 06:42:33PM -0800, Philip Guenther wrote:
<editor hat off>

If I want to search for control characters in a message's subject
(or body, using the body extension) or include them in a vacation
reply or notification message, why shouldn't I be able to?

<editor hat on>

From the Exim Sieve implementation:

----------
Sieve scripts can not contain NUL characters in strings, but mail
headers could contain MIME encoded NUL characters, which could never
be matched by Sieve scripts using exact comparisons.  For that reason,
this implementation extends the Sieve quoted string syntax with \0
to describe a NUL character, violating \0 being the same as 0 in
RFC 3028.  Even without using \0, the following tests are all true in
this implementation.  Implementations that use C-style strings will only
evaulate the first test as true.

Subject: =?iso-8859-1?q?abc=00def

header :contains "Subject" ["abc"]
header :contains "Subject" ["def"]
header :matches "Subject" ["abc?def"]

Note that by considering Sieve to be a MUA, RFC 2047 can be interpreted
in a way that NUL characters truncating strings is allowed for Sieve
implementations, although not recommended.  It is further allowed to use
encoded NUL characters in headers, but that's not recommended either.
The above example shows why.  Good code should still be able to deal
with it.
----------

I doubt repeating it makes a difference to anybody here, but I would
really like if RFC 3028 specified behaviour of the above comparisons.

Michael


<Prev in Thread] Current Thread [Next in Thread>