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

Re: Multiple actions in Sieve script.

1999-01-21 20:17:54
There are a couple of interrelated issues here, and I'd like to try
to seperate them.  Please let me know if I have this right.  I've also
included my opinions on each...

Issue #1 -- Conflicting Actions:

I'd like to know what the semantics of the following script is:

forward "greenfie(_at_)gauss(_dot_)rutgers(_dot_)edu";
reject "i no longer read electronic mail";

I believe such scripts should create an error, and that the default
action ("keep") should be taken.

---

Issue #2: Multiple Actions

Currently, sieve can allow multiple actions to be taken.  Consider the
following script:

keep;
forward "greenfie(_at_)gauss(_dot_)rutgers(_dot_)edu";

To me, this is a logically coherent script, and should take the action
of both forwarding all mail and storing it as normal.  It is different
from the script:

forward "greenfie(_at_)gauss(_dot_)rutgers(_dot_)edu";

which does _not_ keep the mail locally.  The default "keep" action is
_only_ taken when no explicit actions occur in the script.

To me, "forward", "fileinto", and "keep" are all compatible.  We could
say that this is implementation dependant, and any use of multiple
actions could be treated as a run-time error like #1 above.

---

Issue #3: Many Fileinto

My implementation accepts a string-list as the argument for fileinto,
and will honor multiple fileinto's.  It will attempt to run all of
them, and if an error occurs, it will attempt delivery to the default
mailbox (like a "keep").

I think multiple fileinto's are a very useful thing---I think users
will expect it, though I realize that this is hard (impossible?) for
some systems.  I think on those systems, multiple fileinto's should be
handled the same way #1 is above.  

I think that the simplicity of a single "fileinto" action is more
useful than having multiple actions some of which are primary and some
secondary.  After all, what's the interpretation of the following
script:

copyinto "INBOX.foo"; # no primary actions

does this do an implicit "keep"?  What about:

copyinto "INBOX.foo";                 # secondary action?
forward "greenfie(_at_)gauss(_dot_)rutgers(_dot_)edu"; # primary action?
---

Larry