I think the base specification could use a little clarification about
how this is supposed to be handled.
The main issue is that the envelope test deals with data in a structured way:
THe :domain and :localpart tests operate on parts of an address and hence
require parsing, and even :all is required to discard source route information,
which also requires parsing.
People definitely want to be able to write things like:
if envelope :is :all "from" "" {empty envelope from, handle as report}
But what should
envelope :is: :domain "from" ""
do? And if the MAIL FROM address is syntactically invalid, what should happen?
FWIW, I'd be in favor of having a null MAIL FORM result in an empty string
being tested regardless of which ADDRESS-PART is specified. As for invalid
MAIL FROM values, I'm inclined to say that :all should test against the
literal string inside the <>s and :domain and :localpart should test
against the empty string. This way you can test for specific bogons and
handle them accordingly.
THoughts?
Ned