[dev] [patch] for sieve forward/keep action ambiguity

Tobias Drewry tdrewry at bu.edu
Fri Sep 21 16:28:50 UTC 2007


The attached patch fixes a problem in the keep behavior for the 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 at server";
     keep;
}

and without Keep:
# Forwards
if true {
     redirect "username at 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 at server";
     stop;
}

With Keep:

# Forwards
if true {
     redirect "username at 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                                              617-353-8282
Analyst/Consultant III                                   tdrewry at bu.edu
Boston University                              Central Consulting Group
-----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sieve.php.patch
Type: text/x-patch
Size: 1972 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20070921/ed90a7d1/attachment.bin 


More information about the dev mailing list