Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dovecot sieve plugin global rules

94 views
Skip to first unread message

"M.Atıf CEYLAN"

unread,
Jun 30, 2013, 4:40:01 PM6/30/13
to
Hi all,
I use Dovecot 2.1.7 on debian squeeze with Sieve plugin. Sieve rules are
working nicely if I use the rules in user directories. But if I want to
use global rule it's not working. My configuration is below,

/etc/dovecot/conf.d/90-sieve.conf :
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
sieve_global_dir = /etc/dovecot/sieve/
}

/etc/dovecot/sieve/dovecot.sieve :

require ["fileinto"];
# rule:[test]
if header :contains "From" "abc.com"
{
fileinto "INBOX.Junk";
}

This rule is working in the user directory.

Regards,

--
M.Atıf CEYLAN
Yurdum Yazılım


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/51D096CD...@atifceylan.com

staticsafe

unread,
Jul 1, 2013, 7:30:02 AM7/1/13
to
On Sun, Jun 30, 2013 at 11:36:29PM +0300, "M.Atıf CEYLAN" wrote:
> Hi all,
> I use Dovecot 2.1.7 on debian squeeze with Sieve plugin. Sieve rules
> are working nicely if I use the rules in user directories. But if I
> want to use global rule it's not working. My configuration is below,
>
> /etc/dovecot/conf.d/90-sieve.conf :
> plugin {
> sieve = ~/.dovecot.sieve
> sieve_dir = ~/sieve
> sieve_global_dir = /etc/dovecot/sieve/
> }
>
> /etc/dovecot/sieve/dovecot.sieve :
>
> require ["fileinto"];
> # rule:[test]
> if header :contains "From" "abc.com"
> {
> fileinto "INBOX.Junk";
> }
>
> This rule is working in the user directory.
>
> Regards,
>
> --
> M.Atıf CEYLAN
> Yurdum Yazılım
>

Your configuration is wrong.
sieve_global_dir =

Directory for :global include scripts for the include extension. The
Sieve interpreter only recognizes files that end with a .sieve
extension, so the include extension expects a file called name.sieve
to exist in the sieve_global_dir directory for the following
example:

You want:
sieve_before =

Path to a script file or a directory containing script files that
need to be executed before the user's script. If the path points to
a directory, all the Sieve scripts contained therein (with the
proper .sieve extension) are executed. The order of execution is
determined by the file names, using a normal 8bit per-character
comparison.

Source - http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
--
staticsafe
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Please don't top post.
Please don't CC! I'm subscribed to whatever list I just posted on.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2013070111...@uriel.asininetech.com

"M.Atıf CEYLAN"

unread,
Jul 1, 2013, 10:50:01 AM7/1/13
to
Thanks for the answer.
I tried some different scenarios. But I couldn't run the script. I have
commented "sieve_global_dir" parameter.

My new configuration is below :

plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
sieve_before = /etc/dovecot/sieve/spam.sieve

/etc/dovecot/sieve/spam.sieve (I have compiled manually by sievec) :

require "fileinto";
if header :contains "X-Spam-Flag" ["YES"] {
fileinto "Junk";
stop;
}

--
M.Atıf CEYLAN
Yurdum Yazılım


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/51D194AE...@atifceylan.com

staticsafe

unread,
Jul 3, 2013, 2:40:02 PM7/3/13
to
On Mon, Jul 01, 2013 at 05:39:42PM +0300, "M.Atıf CEYLAN" wrote:
> Thanks for the answer.
> I tried some different scenarios. But I couldn't run the script. I
> have commented "sieve_global_dir" parameter.
>
> My new configuration is below :
>
> plugin {
> sieve = ~/.dovecot.sieve
> sieve_dir = ~/sieve
> sieve_before = /etc/dovecot/sieve/spam.sieve
>
> /etc/dovecot/sieve/spam.sieve (I have compiled manually by sievec) :
>
> require "fileinto";
> if header :contains "X-Spam-Flag" ["YES"] {
> fileinto "Junk";
> stop;
> }
>
> --
> M.Atıf CEYLAN
> Yurdum Yazılım

Sorry for the late reply, do you see any errors in your mail.log or any
other error log defined with dovecot?
--
staticsafe
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Please don't top post.
Please don't CC! I'm subscribed to whatever list I just posted on.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20130703183...@uriel.asininetech.com

M.Atıf CEYLAN

unread,
Jul 3, 2013, 3:20:01 PM7/3/13
to
Unfortunately, doesn't shown any error messages in log files :(

Yurdum Yazılım

M.Atıf CEYLAN

unread,
Jul 3, 2013, 5:20:02 PM7/3/13
to
How can I write sieve log messages into the log file?

Yurdum Yazılım

Darac Marjal

unread,
Jul 4, 2013, 8:40:02 AM7/4/13
to
On Thu, Jul 04, 2013 at 12:15:42AM +0300, M.Atıf CEYLAN wrote:
> How can I write sieve log messages into the log file?

According to http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration,
set sieve_user_log (it'll be ~/.dovecot.sieve.log by default).
signature.asc

"M.Atıf CEYLAN"

unread,
Jul 4, 2013, 9:10:02 AM7/4/13
to
On 07/04/2013 03:39 PM, Darac Marjal wrote:
According to http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration,
set sieve_user_log (it'll be ~/.dovecot.sieve.log by default).
I know this but " sieve_user_log" is user log path. I want to logging everything for the global rule (info, warning and errors). My global rule not working but I don't know why not working it is.
0 new messages