Global sieve doesn't run and I don't know why
Hi Everyone,
I have dovecot, postfix, roundcube and piegeonhole managesieve all working nicely together. Personal scripts defined in roundcube run without issue.
I have configured the global sieve dir defined in 90-sieve.conf:
sieve_global_dir = /var/lib/dovecot/sieve/global/
I pre-compiled the script in there:
# ls -l /var/lib/dovecot/sieve/global/ total 8 -rw-r--r--. 1 root root 118 Sep 19 16:52 global.sieve -rw-r--r--. 1 root root 197 Sep 19 16:56 global.svbin
But, in the logs for dovecot, I never see the script being run:
https://www.pastiebin.com/5ba3faa8628c2
Users are from freeipa. Their home directories are symlinks to where the mail really lives. For example:
lrwxrwxrwx. 1 ranbir virtual 42 May 25 2017 ranbir -> /var/spool/mail/domain.tld/ranbir/
And the contents of that dir:
[root@mailhost conf.d]# ls -al /home/DOMAIN/ranbir/ total 64 drwxrwx---. 4 ranbir virtual 4096 Sep 18 17:40 . drwxrwx---+ 13 virtual virtual 4096 Jul 8 12:06 .. -rw-------. 1 ranbir ranbir 17808 Sep 20 01:13 .bash_history -rw-------. 1 ranbir ranbir 18 Dec 14 2015 .bash_logout -rw-------. 1 ranbir ranbir 193 Dec 14 2015 .bash_profile -rw-------. 1 ranbir ranbir 231 Dec 14 2015 .bashrc lrwxrwxrwx. 1 virtual virtual 23 Feb 11 2018 .dovecot.sieve -> sieve/managesieve.sieve lrwxrwxrwx. 1 virtual virtual 23 Sep 18 16:53 .dovecot.sieve.log -> sieve/dovecot.sieve.log -rw-rw----. 1 virtual virtual 322 Sep 18 17:40 .dovecot.svbin -rw-------. 1 ranbir ranbir 59 Jun 7 2016 .lesshst drwx------. 56 virtual virtual 4096 Sep 20 15:02 Maildir drwxrwx---. 3 ranbir virtual 89 Sep 18 17:16 sieve -rw-------. 1 ranbir ranbir 6415 Feb 11 2018 .viminfo
Did I miss something in the configuration? Dovecot isn't throwing any errors. I can only conclude I haven't completed the setup for global sieve to work or that I've misunderstood what the "sieve_global_dir" paramater is for.
Thanks!
-- Ranbir
Op 20/09/2018 om 22:02 schreef Ranbir:
Hi Everyone,
I have dovecot, postfix, roundcube and piegeonhole managesieve all working nicely together. Personal scripts defined in roundcube run without issue.
I have configured the global sieve dir defined in 90-sieve.conf:
sieve_global_dir = /var/lib/dovecot/sieve/global/
I pre-compiled the script in there:
# ls -l /var/lib/dovecot/sieve/global/ total 8 -rw-r--r--. 1 root root 118 Sep 19 16:52 global.sieve -rw-r--r--. 1 root root 197 Sep 19 16:56 global.svbin
But, in the logs for dovecot, I never see the script being run:
https://www.pastiebin.com/5ba3faa8628c2
Users are from freeipa. Their home directories are symlinks to where the mail really lives. For example:
lrwxrwxrwx. 1 ranbir virtual 42 May 25 2017 ranbir -> /var/spool/mail/domain.tld/ranbir/
And the contents of that dir:
[root@mailhost conf.d]# ls -al /home/DOMAIN/ranbir/ total 64 drwxrwx---. 4 ranbir virtual 4096 Sep 18 17:40 . drwxrwx---+ 13 virtual virtual 4096 Jul 8 12:06 .. -rw-------. 1 ranbir ranbir 17808 Sep 20 01:13 .bash_history -rw-------. 1 ranbir ranbir 18 Dec 14 2015 .bash_logout -rw-------. 1 ranbir ranbir 193 Dec 14 2015 .bash_profile -rw-------. 1 ranbir ranbir 231 Dec 14 2015 .bashrc lrwxrwxrwx. 1 virtual virtual 23 Feb 11 2018 .dovecot.sieve -> sieve/managesieve.sieve lrwxrwxrwx. 1 virtual virtual 23 Sep 18 16:53 .dovecot.sieve.log -> sieve/dovecot.sieve.log -rw-rw----. 1 virtual virtual 322 Sep 18 17:40 .dovecot.svbin -rw-------. 1 ranbir ranbir 59 Jun 7 2016 .lesshst drwx------. 56 virtual virtual 4096 Sep 20 15:02 Maildir drwxrwx---. 3 ranbir virtual 89 Sep 18 17:16 sieve -rw-------. 1 ranbir ranbir 6415 Feb 11 2018 .viminfo
Did I miss something in the configuration? Dovecot isn't throwing any errors. I can only conclude I haven't completed the setup for global sieve to work or that I've misunderstood what the "sieve_global_dir" paramater is for.
https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Multiple_...
Regards,
Stephan.
On Thu, 2018-09-20 at 22:34 +0200, Stephan Bosch wrote:
https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Mu ltiple_Scripts_Sequentially
I've seen this suggested on this list and across the web. What I don't understand is why is this necessary when there is a config paramater to set a global sieve dir. It's not the order of filtering that is the problem, after all. My issue is that the sieve file in the global sieve dir isn't being used.
My dovecot server is running on a fully updated CentOS 7 server. The dovecot version I'm running is 2.2.10.
-- Ranbir
On 21 September 2018 at 23:07 Ranbir <m3freak@thesandhufamily.ca> wrote:
On Thu, 2018-09-20 at 22:34 +0200, Stephan Bosch wrote:
https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Mu ltiple_Scripts_Sequentially
I've seen this suggested on this list and across the web. What I don't understand is why is this necessary when there is a config paramater to set a global sieve dir. It's not the order of filtering that is the problem, after all. My issue is that the sieve file in the global sieve dir isn't being used.
My dovecot server is running on a fully updated CentOS 7 server. The dovecot version I'm running is 2.2.10.
-- Ranbir
Did you forget the pastebin link? Also 2.2.10 is ancient.
Aki
On Fri, 2018-09-21 at 23:09 +0300, Aki Tuomi wrote:
Did you forget the pastebin link?
I had it in my first post. Here it is again:
https://www.pastiebin.com/5ba3faa8628c2
Also 2.2.10 is ancient.
I totally understand, but it's what ships with "CentOS Linux release 7.5.1804 (Core)".
-- Ranbir
On 21 September 2018 at 23:10 Ranbir <m3freak@thesandhufamily.ca> wrote:
On Fri, 2018-09-21 at 23:09 +0300, Aki Tuomi wrote:
Did you forget the pastebin link?
I had it in my first post. Here it is again:
https://www.pastiebin.com/5ba3faa8628c2
Also 2.2.10 is ancient.
I totally understand, but it's what ships with "CentOS Linux release 7.5.1804 (Core)".
-- Ranbir
You probably wanted to use sieve_before instead of sieve_global. sieve_global is directory which is used when you refer to scripts using :global tag, not scripts ran globally.
Aki
On Fri, 2018-09-21 at 23:15 +0300, Aki Tuomi wrote:
You probably wanted to use sieve_before instead of sieve_global. sieve_global is directory which is used when you refer to scripts using :global tag, not scripts ran globally.
Awesome! Thank you for clarifying it to me. I was pretty confident I was misunderstanding what the global_sieve_dir parameter was for.
Thanks again!
-- Ranbir
On Thu, 2018-09-20 at 22:34 +0200, Stephan Bosch wrote:
https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Mu ltiple_Scripts_Sequentially
You were right! Thanks.
At least I knew I was probably using the global_sieve_dir parameter incorrectly. :)
-- Ranbir
set mail_debug=yes, try again, and check logs
take one email (the whole email as source), store it as mail.eml and use sieve-test to find out if your script is broken.
Aki
On 20.09.2018 23:02, Ranbir wrote:
Hi Everyone,
I have dovecot, postfix, roundcube and piegeonhole managesieve all working nicely together. Personal scripts defined in roundcube run without issue.
I have configured the global sieve dir defined in 90-sieve.conf:
sieve_global_dir = /var/lib/dovecot/sieve/global/
I pre-compiled the script in there:
# ls -l /var/lib/dovecot/sieve/global/ total 8 -rw-r--r--. 1 root root 118 Sep 19 16:52 global.sieve -rw-r--r--. 1 root root 197 Sep 19 16:56 global.svbin
But, in the logs for dovecot, I never see the script being run:
https://www.pastiebin.com/5ba3faa8628c2
Users are from freeipa. Their home directories are symlinks to where the mail really lives. For example:
lrwxrwxrwx. 1 ranbir virtual 42 May 25 2017 ranbir -> /var/spool/mail/domain.tld/ranbir/
And the contents of that dir:
[root@mailhost conf.d]# ls -al /home/DOMAIN/ranbir/ total 64 drwxrwx---. 4 ranbir virtual 4096 Sep 18 17:40 . drwxrwx---+ 13 virtual virtual 4096 Jul 8 12:06 .. -rw-------. 1 ranbir ranbir 17808 Sep 20 01:13 .bash_history -rw-------. 1 ranbir ranbir 18 Dec 14 2015 .bash_logout -rw-------. 1 ranbir ranbir 193 Dec 14 2015 .bash_profile -rw-------. 1 ranbir ranbir 231 Dec 14 2015 .bashrc lrwxrwxrwx. 1 virtual virtual 23 Feb 11 2018 .dovecot.sieve -> sieve/managesieve.sieve lrwxrwxrwx. 1 virtual virtual 23 Sep 18 16:53 .dovecot.sieve.log -> sieve/dovecot.sieve.log -rw-rw----. 1 virtual virtual 322 Sep 18 17:40 .dovecot.svbin -rw-------. 1 ranbir ranbir 59 Jun 7 2016 .lesshst drwx------. 56 virtual virtual 4096 Sep 20 15:02 Maildir drwxrwx---. 3 ranbir virtual 89 Sep 18 17:16 sieve -rw-------. 1 ranbir ranbir 6415 Feb 11 2018 .viminfo
Did I miss something in the configuration? Dovecot isn't throwing any errors. I can only conclude I haven't completed the setup for global sieve to work or that I've misunderstood what the "sieve_global_dir" paramater is for.
Thanks!
On Fri, 2018-09-21 at 09:15 +0300, Aki Tuomi wrote:
set mail_debug=yes, try again, and check logs
The output copied and linked to on pastiebin.com is with mail_debug=yes set. I never see the global sieve script even read.
take one email (the whole email as source), store it as mail.eml and use sieve-test to find out if your script is broken.
I will do that. But, the global sieve is a verbatim copy of the filter I had in my personal sieve file. I only have one filter in the global sieve:
require ["fileinto"];
# rule:[Spam filter] if header :contains "X-Spam-Flag" ["YES"] { fileinto "Spam"; stop; }
I am perplexed!
-- Ranbir
On 9/21/18, 3:05 PM, "dovecot on behalf of Ranbir" <dovecot-bounces@dovecot.org on behalf of m3freak@thesandhufamily.ca> wrote:
On Fri, 2018-09-21 at 09:15 +0300, Aki Tuomi wrote:
> 1.
>
> set mail_debug=yes, try again, and check logs
The output copied and linked to on pastiebin.com is with mail_debug=yes
set. I never see the global sieve script even read.
> 2.
>
> take one email (the whole email as source), store it as mail.eml and
> use
> sieve-test to find out if your script is broken.
I will do that. But, the global sieve is a verbatim copy of the filter
I had in my personal sieve file. I only have one filter in the global
sieve:
require ["fileinto"];
# rule:[Spam filter]
if header :contains "X-Spam-Flag" ["YES"]
{
fileinto "Spam";
stop;
}
I am perplexed!
Did you compile (sievec) the script?
On Fri, 2018-09-21 at 20:07 +0000, Larry Rosenman wrote:
Did you compile (sievec) the script?
Yes, I mentioned this in my first post. Here are the contents of the global sieve dir:
[root@mailhost global]# ls -al total 8 drwxr-xr-x. 2 root root 44 Sep 21 16:12 . drwxr-xr-x. 3 root root 19 Sep 11 12:04 .. -rw-r--r--. 1 root root 118 Sep 19 16:52 global.sieve -rw-r--r--. 1 root root 197 Sep 19 16:56 global.svbin
That looks ok to me. Plus, sievec didn't complain when I ran it on global.sieve.
-- Ranbir
participants (4)
-
Aki Tuomi
-
Larry Rosenman
-
Ranbir
-
Stephan Bosch