On Mon, May 30, 2005 at 02:31:47PM +0100, Nigel Swinson wrote:
if anyof (header :is "Cc" "", not exists "Cc")
Given that the language definition has no way to express a NULL, I don't
see that as a bad way to state the test. It's clearer to me than the
regex solution (and the equivalent :matches solution).
Even if there was a way to express a NULL, the following:
What might be nice is if we could say:
if header :is "Cc" NULL // ie if the header is absent or empty
really wouldn't work either. A NULL would still have to be different
from the empty string, so you'd have to say:
if header :is "Cc" [ NULL, "" ] // if the header is absent or empty
which is indeed slightly tighter and clearer than the 'anyof' test.
Personally I'm not against having a NULL reserved keyword that
represents a missing string value, but it would probably involve a lot
of changes to existing implementations. I doubt it would be disruptive
to existing sieve scripts though-- only to implementations, thus it
would have to be done via an extension and not a 3028bis addition, and
probably would be quite a bit of an uphill battle.
I think a NULL test of some sort could be useful with variables,
but that's another road that's already been paved...
mm