Stephan Bosch writes:
Hello,
I am finishing up a first release of my Sieve implementation, and one
of the TODO items that yet remains is getting some answers to
questions that arose during development. I've collected these into a
file an now I submit them to this list to get some clarification. Any
help is greatly appreciated.
* RFC 5228 (Sieve) : 5.1. Test address:
"Implementations MUST restrict the address test to headers that
contain addresses, but MUST include at least From, To, Cc, Bcc,
Sender, Resent-From, and Resent-To, and it SHOULD include any other
header that utilizes an "address-list" structured header body."
-> Will this cause a compile error, or are the disallowed headers
simply ignored? My implementation currently considers this to be a
compile error.
So does mine.
-> Given the variables extension, sometimes the specified header names
aren't known until runtime. If the previous answer was to cause a
compile error, should this abort the script at runtime?
I don't have variables (yet?). I expect that I would try to give an
error at compile time and to avoid runtime errors.
* RFC 5228 (Sieve) : 5.4. Test envelope:
"The "envelope" test is true if the specified part of the [SMTP] (or
equivalent) envelope matches the specified key. This specification
defines the interpretation of the (case insensitive) "from" and "to"
envelope-parts. Additional envelope-parts may be defined by other
extensions; implementations SHOULD consider unknown envelope parts an
error."
Again, I give an error at compile time, none at runtime.
-> Given the variables extension, sometimes the specified envelope
parts aren't known until runtime. Should invalid ones abort the
script or is ignoring them a better practice?
Sieve is a simple language... All commands in a script can be arranged
into basic blocks, and the basic blocks form a DAG. (I don't remember
whether this remains true with Ned's MIME/looping extension.)
I wonder whether it is possible to walk along the DAG and say "this
assignment is invalid since it leads to an error when the variable is
used".
Arnt