[Dovecot] Combining ManageSieve with hand-written scripts
Hi, new to Dovecot, forgive me if I'm missing something basic...
I'm trying to figure out if there's a way to use a couple of custom rules alongside ManageSieve. Most of the time I like the ManageSieve interface in Roundcube, but there's one rule that I can't get it to do the way I want (it's a notify rule, and I don't like the way Roundcube constructs the notify). I figured out how to write it by hand, but of course I can't put my own rules in Roundcube's file or it gets really confused. I tried adding an include to the generated file, but Roundcube politely removes it for me the next time I use the rule editor. (Squirrelmail doesn't seem to be any better in this regard.)
I thought I could do something like sieve_before = ~/sieve/custom.sieve
but that doesn't seem to work. I couldn't even see any evidence in the log that it attempted to look at that file. Apparently sieve_before isn't meant to work on a per-user basis.
If I do a global sieve_before, can I have it "include :personal"? If so, what's going to happen with the script compilation? From what I understand, it can't be compiled globally, since each user has a different custom rule set.
Am I trying to do the impossible here?
Thanks for any ideas, Jason Bleazard
On Mon, 30 Aug 2010 13:15:43 -0400, Jason Bleazard jason.dovecot@bleazard.net wrote:
Hi, new to Dovecot, forgive me if I'm missing something basic...
I'm trying to figure out if there's a way to use a couple of custom rules alongside ManageSieve. Most of the time I like the ManageSieve interface in Roundcube, but there's one rule that I can't get it to do the way I want (it's a notify rule, and I don't like the way Roundcube constructs the notify). I figured out how to write it by hand, but of course I can't put my own rules in Roundcube's file or it gets really confused. I tried adding an include to the generated file, but Roundcube politely removes it for me the next time I use the rule editor. (Squirrelmail doesn't seem to be any better in this regard.)
I thought I could do something like sieve_before = ~/sieve/custom.sieve
my installation support sieve_before scripting
quote part of dovecot -n
plugin { plugin = autocreate managesieve sieve sieve = ~/.dovecot.sieve sieve_before = /var/sieve-scripts/roundcube.sieve sieve_dir = ~/sieve sieve_global_path = whatever }
but that doesn't seem to work. I couldn't even see any evidence in the log that it attempted to look at that file. Apparently sieve_before isn't meant to work on a per-user basis.
If I do a global sieve_before, can I have it "include :personal"? If so, what's going to happen with the script compilation? From what I understand, it can't be compiled globally, since each user has a different custom rule set.
Am I trying to do the impossible here?
Thanks for any ideas, Jason Bleazard
On Mon, 30 Aug 2010 13:15:43 -0400, Jason Bleazard jason.dovecot@bleazard.net wrote:
I thought I could do something like sieve_before = ~/sieve/custom.sieve
but that doesn't seem to work.
Okay, I did a bit more reading and testing and figured it out. I hadn't previously noticed that %h also specifies the user home directory. Setting "sieve_before = %h/sieve/custom.sieve" DOES work, where the ~ didn't. The ~ works for the sieve and sieve_dir settings, but apparently not sieve_before or sieve_after.
So I'm happy, just thought I'd share the answer with the rest of the list.
Thanks, Jason
participants (2)
-
fakessh
-
Jason Bleazard