On 1/30/2011 9:40 AM, Christoph Pleger wrote:> Hello,
>
> I am using squirrelmail with avelsieve to edit my filter rules. The filter
> rules are like this:
>
> 1. If the message contains a virus, delete the mail and notify me by email.
> 2. If the message is spam, deliver it to my spam folder.
> 3. If the message is from the dovecot mailing list, deliver it to my
dovecot
> folder
>
> Yesterday, I created a new user and wanted to let him have rules 1 and 2
like
> above, only with another destination for email notification. So, I copied
my
> sieve script into the sieve directory of the new user, deleted rule 3,
> changed the destination for email notification and then called sievec to
> compile the rule set.
>
> But this did not work like expected: Using squirrelmail, I saw that the new
> user had only rules 1 and 2, but the destination in rule 1 still contains
my
> email address. My own account still has three rules.
>
> So, this simple way of copying sieve scripts does not work. Is there
another
> way to copy sieve rules from one user to another?
Avelsieve encodes its actual rules in some base64-encoded comment above
the Sieve code. If you only modify that Sieve code, Avelsieve will still
use the encoded comment for reading rules. So, you can copy and modify a
Sieve script, but it will only work until you open it in AvelSieve,
which is when (part of) the original script returns to haunt you.
This is not really a Sieve problem, meaning that I cannot help you on
this much. You could delve into the details of Avelsieve's encoding
method and modify the scripts by hand.. or you could create a template
account from which you edit the scripts for new accounts and copy them
from there.
To my opinion, the RoundCube Sieve plugin handles this much better by
parsing the actual Sieve code to retrieve the rules and using plaintext
comments for meta data. However, I do agree that some standardized
method of encoding meta data in Sieve scripts could solve much of this,
also for interoperability. However, this won't be done any time soon.
Regards,
Stephan.