Possible Issue in RFC6609, Include Extension

Tony G <[email protected]>
Newsgroups gmane.ietf.mta-filters
Message-ID <CAD_xRwotXYWmXxBnt3Tx5CUY_BpHO52WraWfjaeLGQvfr7C+6g@mail.gmail.com>
 Ref RFC 6609 section 3.2
<https://datatracker.ietf.org/doc/html/rfc6609.html#section-3.2> Page 5:

> Note: It is RECOMMENDED that script authors
> and generators use the ":once" parameter only
> when including a script that performs general
> duties* such as declaring global variables* and
> making sanity checks of the environment.

To be clear:
- The text implies that we can Include a common script that sets global
variables for the current "including" script.
- In other words, by including a script that has a "global" statement, it
is implied that the global variables should be available to the current
script.
- Or stated a third way in case there is confusion: If we use the :once
parameter on an Include statement, if the expected "duty" of the included
script is to declare global variables, then we would expect those variables
to be available on return.

I don't believe that's correct, though I wish it were. This would allow us
to create a block of global statements once and then call to that common
definition from everywhere else.

But everything else about local and global variables seems to emphasize
that any variable not explicitly defined in the current script as global
must be treated as local.

Given the ambiguity here I'm guessing this is subject to interpretation for
each implementation.

Therefore, I'm wondering:
1) Does the Pidgeonhole Sieve Include Extension
<https://doc.dovecot.org/configuration_manual/sieve/extensions/include/>
support importing global variables through an Include, as that Note states?
2) Does any other implementation?
3) Is that text an error, or is this detail really left up to the
implementation?
4) Should the RFC be amended?

Thanks.

_______________________________________________
sieve mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/sieve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.