[Dovecot] Sieve question
Stephan Bosch
stephan at rename-it.nl
Tue Jun 14 09:36:35 EEST 2011
Op 13-6-2011 4:41, Dhaval Patel schreef:
> --------------------------------------------------------------
> require "fileinto";
> if header :contains "X-Spam-Flag" "YES" {
> fileinto "spam";
> }
> --------------------------------------------------------------
>
> My first question is, where is this global script? Do I configure the
> "sieve_global_dir = /etc/dovecot/sieve/"? What about he filename?
http://wiki.dovecot.org/LDA/Sieve/Dovecot#Executing_Multiple_Scripts_Sequentially
Use sieve_before. Script name is mainly important when a directory is
specified, in which case it must end with .sieve. The directory/file can
be located anywhere you like.
> Most users will not need any additional rules. There are some users that do and
> I am having a difficult time figuring out how it would be setup. My second
> question is the following. Is there a way in the global script to check if there
> is a file called /etc/dovecot/sieve/username or
> /home/vmail/username/personal_sieve_script and include it?
Not like that. There is an include extension, but that is not able to do
optional includes (maybe it should). You can use multiscript support for
this too. Make the sieve_before setting dependent on the user, make it
point to two alternative directories, each containing (symlinks to) a
different set of scripts.
> I was using maildrop before this and procmail before that so I apologies for
> sounding stupid if this is not how Sieve scripts work.
>
> I am by no means tied the methods I describe above. If anyone knows of a better
> way to achieve what I am trying to do, I would appreciate if you let me know of
> it.
Regards,
Stephan.
More information about the dovecot
mailing list