Summary | patch to resolve sieve forward/keep ambiguity |
Queue | Ingo |
Queue Version | FRAMEWORK_3 |
Type | Enhancement |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | tdrewry (at) bu (dot) edu |
Created | 09/26/2007 (6465 days ago) |
Due | |
Updated | 10/09/2007 (6452 days ago) |
Assigned | 09/26/2007 (6465 days ago) |
Resolved | 10/07/2007 (6454 days ago) |
Milestone | |
Patch | Yes |
your patch was supposed to, because it didn't work at all. :) You
were referring to variables that didn't exist, the "stop" rule was
not added after the redirect call, etc.
Please see if what I committed to CVS now is what you wanted to achieve.
though. However, I'm not complaining, your code is much cleaner then
what I generated.
Thanks again,
Tobias
State ⇒ Resolved
your patch was supposed to, because it didn't work at all. :) You were
referring to variables that didn't exist, the "stop" rule was not
added after the redirect call, etc.
Please see if what I committed to CVS now is what you wanted to achieve.
this change:
With keep, your patch enables all other filter rules to be applied
while this didn't happen without your patch?
was to immediately copy the message to the users INBOX and then pass
the message to any remaining filters. This would result in duplicates
of the messages being saved to folders as well as to the INBOX.
By moving the keep action to a separate rule at the end of the sieve
list, you are able to move the forward rule around so as to allow some
or all of your filters to be used (and possible stop the filtering)
before the keep action is executed.
The 'stop' action in the Forward Keep Action is just there for
completeness. It makes the sieve script behave reliably no matter
what version of the RFC is in use (i.e. it is slightly redundant).
already doesn't keep the message?
to any other filters until a stop action is found.
The redirect directive disable the implicit keep in Sieve. With the
implicit keep disabled, when a message reaches the end of the filter
list it is not "kept".
However, if the message matched any filters after the redirect, then
the message is also delivered according to the rules of that message.
The stop prevents further processing of the mail message after the
forward, thus preventing messages from collecting in folders when a
user is thinking that all of their mail is being redirected.
Let me know if you need examples or more explanation. I can also site
the RFC if needed.
- Tobias
Taken from
State ⇒ Feedback
this change:
With keep, your patch enables all other filter rules to be applied
while this didn't happen without your patch?
Without keep, what does the extra "stop" change, if "redirect" already
doesn't keep the message?
Assigned to
State ⇒ Assigned
Priority ⇒ 2. Medium
State ⇒ New
New Attachment: sieve.php.patch
Queue ⇒ Ingo
Summary ⇒ patch to resolve sieve forward/keep ambiguity
Type ⇒ Enhancement
Forward script by
creating two Sieve rules to handle 'redirect' and 'keep' as separate actions.
Currently using Forward with Keep looks like this:
# Forwards
if true {
redirect "username@server";
keep;
}
and without Keep:
# Forwards
if true {
redirect "username@server";
}
The behavior of the first script is to redirect mail as expected and
then immediately
drop a copy into the Inbox followed by parsing of any additional filters.
The second script will redirect the mail and then continue to parse
via additional rules
until a stop is encountered. Mail is not delivered into the Inbox at
the end of the
script.
The reason why mail does not go to the inbox during a Forward request
is that the
redirect action disables the implicit keep within Sieve.
The keep action declares an _explicit_ keep action which is the same
as declaring:
fileinto "Inbox".
This patch results one of the following:
Without Keep:
# Forwards
if true {
redirect "username@server";
stop;
}
With Keep:
# Forwards
if true {
redirect "username@server";
}
... any other rules that exist with the last rule being ...
# Forward Keep Action
if true {
keep;
stop;
}
A user can still move the position of the Forwards script within Ingo.
The Forward Keep Action script is always placed at the end. This
script replicated the
implicit keep function.
- Tobias Drewry