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 at 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 at 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_Scripts_Sequentially Regards, Stephan.
1. set mail_debug=yes, try again, and check logs 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. 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 at 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:> 1. > > set mail_debug=yes, try again, and check logsThe 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! -- Ranbir
On Thu, 2018-09-20 at 22:34 +0200, Stephan Bosch wrote:> https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Mu > ltiple_Scripts_SequentiallyI'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 Thu, 2018-09-20 at 22:34 +0200, Stephan Bosch wrote:> https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Executing_Mu > ltiple_Scripts_SequentiallyYou were right! Thanks. At least I knew I was probably using the global_sieve_dir parameter incorrectly. :) -- Ranbir