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

Re: variables and side-effects of tests

2003-05-10 19:04:28

[Ned Freed]:

  [Marc Mutz]:
  > So the variables extension, as it stands, violates this MUST,
  > since the numerical variables are set as a side-effect of a test
  > with :matches match type. :-(
  >
  > What now?

  We have to reach consensus to revise the specification and remove
  the MUST.

I don't object to a revision of RFC 3028, but an alternative may be to
replace the numerical variables with

  SETMATCH <variables: string-list>

the :matches will change the internal state, and this is still
observable by a user, so it may not be good enough to satisfy language
lawyers.

Example:
  if address :all :matches "To" "*+*(_at_)*(_dot_)ifi(_dot_)uio(_dot_)no" {
     setmatch [ "user", "", "host" ];
  }

(the empty string means throw the value away.)  at least it gets rid
of this problematic code:

  if header :matches "Subject" [ "make * fast", "free ${1}!" ] {
     ...
  }

the behaviour of the above code is an open issue.  I assumed "free
${1}!" would be interpolated _before_ the test was executed, but then
Jutta came up with replaceheader where an argument string is
interpolated _after_ the tests built in to the action have been
performed.  the variables draft does not contain any definitive
wording on this issue.

-- 
Kjetil T.

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