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

Re: Multiple actions in Sieve script.

1999-01-21 20:37:33
At 10:19 PM -0500 1/21/99, Lawrence Greenfield wrote:

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.

I'm not sure. Why should this be an error? Is it because the sender may get a failure DSN even though the message went somewhere?


---

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.

Interesting. To me (and in my implementation), the scripts are identical semantically, as "keep" is performed by default unless a "discard" or "reject" is done.


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.

I'd like to see this spelled out, for consistency.


---

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 this should be a compile error on systems that don't support it. The question is how to spell it.

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?

As I see it, there is no confusion here at all. Both of these scripts also do an implicit "keep" and file into the default mailbox.