[Dovecot] Global Sieve File
Is anyone here using a global Sieve file that handles messages for an entire server with many users? I understand and use local Sieve files, but I would like to learn more about how to set up Sieve to filter ALL incoming messages using a single file. I would love to read about how you managed to get it working.
I'm running Fedora 10 with Postfix 2.5.5 and Dovecot 1.2.rc2.
Thanks for any insight!
James
Is anyone here using a global Sieve file that handles messages for an entire server with many users? I understand and use local Sieve files, but I would like to learn more about how to set up Sieve to filter ALL incoming messages using a single file. I would love to read about how you managed to get it working.
I'm running Fedora 10 with Postfix 2.5.5 and Dovecot 1.2.rc2.
Thanks for any insight! If you are using the new Sieve implementation, you can use the new multiscript feature. It is not explained on the wiki yet (I should give
James Butler schreef: the new Sieve its own page), but things are outlined in the configuration section of the INSTALL file:
http://hg.rename-it.nl/dovecot-libsieve/raw-file/0.1.4/INSTALL
Be sure to test this new feature extensively though, since it may still contain some bugs.
Regards,
-- Stephan Bosch stephan@rename-it.nl
Thank you very much for your reply, Mr. Bosch. Still trying to iron it out.
If you are using the new Sieve implementation, you can use the new multiscript feature. It is not explained on the wiki yet (I should give the new Sieve its own page), but things are outlined in the configuration section of the INSTALL file:
I'm still getting permissions errors like when I wasn't using 'sieve_before':
dovecot: deliver(user1): sieve: binary open(/dovecot/global.svbin)
failed: Permission denied
dovecot: deliver(user1): sieve: open(/dovecot/global.svbin.tmp)
failed for binary save: Permission denied
dovecot: deliver(user1): sieve: rename(/dovecot/global.before.svbin.tmp,
/dovecot/global.before.svbin) failed for binary save: Permission denied
A normal user (user1) doesn't have permission to do anything in the directory that stores the global.sieve/.svbin files, which is owned by dovecot:dovecot.
Has anyone got a successful installation of a global Sieve file they could describe? Using the multiscript feature would be great, if you have done it successfully. I very much appreciate the way this is supposed to go, according to the docs, and I really hope to find someone who is actually using a global Sieve file successfully, so I can learn from their example. I'm sure it's something simple, but I just can't see the problem in my own installation.
Thanks a lot. (Local Sieve files work fine, but I still have a need for a global filter.)
James
James Butler schreef:
Thank you very much for your reply, Mr. Bosch. Still trying to iron it out.
If you are using the new Sieve implementation, you can use the new multiscript feature. It is not explained on the wiki yet (I should give the new Sieve its own page), but things are outlined in the configuration section of the INSTALL file:
I'm still getting permissions errors like when I wasn't using 'sieve_before':
dovecot: deliver(user1): sieve: binary open(/dovecot/global.svbin)
failed: Permission denied dovecot: deliver(user1): sieve: open(/dovecot/global.svbin.tmp)
failed for binary save: Permission denied dovecot: deliver(user1): sieve: rename(/dovecot/global.before.svbin.tmp,
/dovecot/global.before.svbin) failed for binary save: Permission deniedA normal user (user1) doesn't have permission to do anything in the directory that stores the global.sieve/.svbin files, which is owned by dovecot:dovecot. Well, the user1 doesn't need (and can't have) write permission to the global sieve binaries, but it _must_ have read access to those. Could you verify this? The first log line is the attempt to open (==read) the binary, and that fails already with a permission error. The lines that follow are the attempt to recompile the script and store a new binary (Perhaps I should avoid recompilation when it is obvious that the binary cannot be written).
Regards,
-- Stephan Bosch stephan@rename-it.nl
I am testing yet this version of sieve with dovecot 1.2 beta I have done in dovecot.conf:
protocols = imap imaps pop3 pop3s managesieve mail_plugins = quota sieve sieve_before = /usr/local/etc/sieve/global/.global.dovecot.sieve
more /usr/local/etc/sieve/global/.global.dovecot.sieve:
require "fileinto"; if exists "X-Spam-Flag" { fileinto "spam"; }
I have found that i need a personal script in the home directory to execute this global script, if the user script isn't exists this before script is not run.
Personal script:
more .dovecot.sieve:
require "include";
I am planning to use this to filter spam in a global script and deploy managed sieve with avelsize plugin with squirrelmail to let users configure their vacation messages
I would prefer to have independent global scripts from personal scripts.
Greetings,
Andrés Fernando Yacopino
Infraestructura - Dpto Sistemas
AcaSalud
Cooperativa de Prestaciones Médico Asistenciales Limitada
Tel: 0341-4208726
ayacopino@acasalud.com.ar
James Butler escribió:
Is anyone here using a global Sieve file that handles messages for an entire server with many users? I understand and use local Sieve files, but I would like to learn more about how to set up Sieve to filter ALL incoming messages using a single file. I would love to read about how you managed to get it working.
I'm running Fedora 10 with Postfix 2.5.5 and Dovecot 1.2.rc2.
Thanks for any insight!
James
Andrés Yacopino wrote:
I am testing yet this version of sieve with dovecot 1.2 beta I have done in dovecot.conf:
protocols = imap imaps pop3 pop3s managesieve mail_plugins = quota sieve sieve_before = /usr/local/etc/sieve/global/.global.dovecot.sieve
more /usr/local/etc/sieve/global/.global.dovecot.sieve:
require "fileinto"; if exists "X-Spam-Flag" { fileinto "spam"; }
I have found that i need a personal script in the home directory to execute this global script, if the user script isn't exists this before script is not run.
Personal script:
more .dovecot.sieve:
require "include";
I am planning to use this to filter spam in a global script and deploy managed sieve with avelsize plugin with squirrelmail to let users configure their vacation messages
I would prefer to have independent global scripts from personal scripts.
Yes, this problem was pointed out before. For now, you can work around this by setting a sieve_global_path= pointing to a script containing only 'keep;'. This makes sure the global script is executed, because then there is a default alternative for the personal script if it is missing for a particular user.
I'll fix this in the course of this week.
Regards,
Stephan.
Yes, it works using your solution:
dovecot.conf:
sieve_global_path = /usr/local/etc/sieve/global/default.sieve
/usr/local/etc/sieve/global/default.sieve:
keep;
Thanks,
Andrés Fernando Yacopino
Infraestructura - Dpto Sistemas
AcaSalud
Cooperativa de Prestaciones Médico Asistenciales Limitada
Tel: 0341-4208726
ayacopino@acasalud.com.ar
Stephan Bosch escribió:
Andrés Yacopino wrote:
I am testing yet this version of sieve with dovecot 1.2 beta I have done in dovecot.conf:
protocols = imap imaps pop3 pop3s managesieve mail_plugins = quota sieve sieve_before = /usr/local/etc/sieve/global/.global.dovecot.sieve
more /usr/local/etc/sieve/global/.global.dovecot.sieve:
require "fileinto"; if exists "X-Spam-Flag" { fileinto "spam"; }
I have found that i need a personal script in the home directory to execute this global script, if the user script isn't exists this before script is not run.
Personal script:
more .dovecot.sieve:
require "include";
I am planning to use this to filter spam in a global script and deploy managed sieve with avelsize plugin with squirrelmail to let users configure their vacation messages
I would prefer to have independent global scripts from personal scripts.
Yes, this problem was pointed out before. For now, you can work around this by setting a sieve_global_path= pointing to a script containing only 'keep;'. This makes sure the global script is executed, because then there is a default alternative for the personal script if it is missing for a particular user.
I'll fix this in the course of this week.
Regards,
Stephan.
participants (4)
-
Andrés Yacopino
-
James Butler
-
Stephan Bosch
-
Stephan Bosch