Hi All, I cannot get the sieve_before to work. I have dovecot & sieve installed on Debian 7 as follows /etc/dovecot/conf.d/90-sieve.conf : plugin { # The path to the user's main active script. If ManageSieve is used, this the # location of the symbolic link controlled by ManageSieve. sieve = ~/.dovecot.sieve # The default Sieve script when the user has none. This is a path to a global # sieve script file, which gets executed ONLY if user's private Sieve script # doesn't exist. Be sure to pre-compile this script manually using the sievec # command line tool. # --> See sieve_before fore executing scripts before the user's personal # script. sieve_default = /var/lib/dovecot/sieve/default.sieve # Directory for :personal include scripts for the include extension. This # is also where the ManageSieve service stores the user's scripts. sieve_dir = ~/sieve/ # Directory for :global include scripts for the include extension. sieve_global_dir = /var/lib/dovecot/sieve/ # 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 within a directory is determined by the # file names, using a normal 8bit per-character comparison. Multiple script # file or directory paths can be specified by appending an increasing number. sieve_before = /var/lib/dovecot/sieve/before #####sieve_before2 = /var/lib/dovecot/sieve/before/default2.sieve #sieve_before3 = (etc...) # Identical to sieve_before, only the specified scripts are executed after the # user's script (only when keep is still in effect!). Multiple script file or # directory paths can be specified by appending an increasing number. #sieve_after #sieve_after2 #sieve_after2 = (etc...) # Which Sieve language extensions are available to users. By default, all # supported extensions are available, except for deprecated extensions or # those that are still under development. Some system administrators may want # to disable certain Sieve extensions or enable those that are not available # by default. This setting can use '+' and '-' to specify differences relative # to the default. For example `sieve_extensions = +imapflags' will enable the # deprecated imapflags extension in addition to all extensions were already # enabled by default. #sieve_extensions = +notify +imapflags ................................. In /var/lib/dovecot/sieve/before I have : drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve default2.sieve is as follows: require ["fileinto"]; if allof (header :matches "subject" "*JUNK*") { fileinto "INBOX.Junk"; } The users personal filters work. Thanks for your help. __________________________________________________ Please consider the environment before printing this email. Ger
Hi Ger, sieve_before should be a path to sieve script file, not to a directory. in your configuration, you set sieve_before to /var/lib/dovecot/sieve/before which is a directory. what you need to do is figure out which sieve script you'd like to execute and its path rather. If you think that default2.sieve is the right script then set sieve_before to /var/lib/dovecot/sieve/before/default2.sieve -- Yassine. On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa Blarney <ghooton at scins.ie> wrote:> Hi All, > [...]> plugin { > [...] > > > sieve_before = /var/lib/dovecot/sieve/before >................................. > >In /var/lib/dovecot/sieve/before I have : > >drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. > >-rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin > >-rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve > >default2.sieve is as follows: > >require ["fileinto"]; > >if allof (header :matches "subject" "*JUNK*") { > > fileinto "INBOX.Junk"; > >}
Hi Yassine, That did not work, is there a way to see is the script is been run? ----------------original message----------------- From:chaouche yacine [yacinechaouche at yahoo.com ] To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], dovecot at dovecot.org Date:Tue, 21 Mar 2017 13:06:14 +0000 (UTC) -------------------------------------------------> Hi Ger, > > sieve_before should be a path to sieve script file, not to a directory. > in your configuration, you set sieve_before to > /var/lib/dovecot/sieve/before which is a directory. > > what you need to do is figure out which sieve script you'd like to > execute and its path rather. > If you think that default2.sieve is the right script then set > sieve_before to /var/lib/dovecot/sieve/before/default2.sieve > > -- Yassine. > > > > > On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa > Blarney wrote: > > > > > >> Hi All, >> [...] > >> plugin { >> [...] >> >> >> sieve_before = /var/lib/dovecot/sieve/before >> ................................. >> >> In /var/lib/dovecot/sieve/before I have : >> >> drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. >> >> -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin >> >> -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve >> >> default2.sieve is as follows: >> >> require ["fileinto"]; >> >> if allof (header :matches "subject" "*JUNK*") { >> >> fileinto "INBOX.Junk"; >> >> } >__________________________________________________ Please consider the environment before printing this email. Ger Hooton Systems Administrator Scoil Chro? ?osa Blarney. Blarney. Co. Cork
On 03/21/2017 09:30 AM, Ger Hooton Scoil Chro? ?osa Blarney wrote:> > Hi Yassine, > That did not work, is there a way to see is the script is been run?Perhaps it is an SELinux permissions problem? Try setenforce 0 to see?> ----------------original message----------------- > From:chaouche yacine [yacinechaouche at yahoo.com ] > To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], > dovecot at dovecot.org Date:Tue, 21 Mar 2017 13:06:14 +0000 (UTC) > ------------------------------------------------- > > >> Hi Ger, >> >> sieve_before should be a path to sieve script file, not to a directory. >> in your configuration, you set sieve_before to >> /var/lib/dovecot/sieve/before which is a directory. >> >> what you need to do is figure out which sieve script you'd like to >> execute and its path rather. >> If you think that default2.sieve is the right script then set >> sieve_before to /var/lib/dovecot/sieve/before/default2.sieve >> >> -- Yassine. >> >> >> >> >> On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa >> Blarney wrote: >> >> >> >> >> >>> Hi All, >>> [...] >> >>> plugin { >>> [...] >>> >>> >>> sieve_before = /var/lib/dovecot/sieve/before >>> ................................. >>> >>> In /var/lib/dovecot/sieve/before I have : >>> >>> drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. >>> >>> -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin >>> >>> -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve >>> >>> default2.sieve is as follows: >>> >>> require ["fileinto"]; >>> >>> if allof (header :matches "subject" "*JUNK*") { >>> >>> fileinto "INBOX.Junk"; >>> >>> } >> > > __________________________________________________ > > Please consider the environment before printing this email. > Ger Hooton > Systems Administrator > Scoil Chro? ?osa Blarney. > Blarney. > Co. Cork >
On 03/21/2017 09:06 AM, chaouche yacine wrote:> Hi Ger, > > sieve_before should be a path to sieve script file, not to a directory. > in your configuration, you set sieve_before to /var/lib/dovecot/sieve/before which is a directory.I don't get that reading: https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration Either file or directory. If a file, it searches for the svbin of that name, otherwise compiles your script. If directory, executes all in the directory.> what you need to do is figure out which sieve script you'd like to execute and its path rather. > If you think that default2.sieve is the right script then > > set sieve_before to /var/lib/dovecot/sieve/before/default2.sieve > > -- Yassine. > > > > > On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa Blarney <ghooton at scins.ie> wrote: > > > > > >> Hi All, >> [...] >> plugin { >> [...] >> >> >> sieve_before = /var/lib/dovecot/sieve/before >> ................................. >> >> In /var/lib/dovecot/sieve/before I have : >> >> drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. >> >> -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin >> >> -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve >> >> default2.sieve is as follows: >> >> require ["fileinto"]; >> >> if allof (header :matches "subject" "*JUNK*") { >> >> fileinto "INBOX.Junk"; >> >> }
Thanks Robert, how do I do that? ----------------original message----------------- From:Robert Moskowitz [rgm at htt-consult.com ] To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], chaouche yacine [yacinechaouche at yahoo.com ], dovecot at dovecot.org Date:Tue, 21 Mar 2017 09:47:18 -0400 -------------------------------------------------> > > On 03/21/2017 09:30 AM, Ger Hooton Scoil Chro? ?osa Blarney wrote: >> >> Hi Yassine, >> That did not work, is there a way to see is the script is been run? > > Perhaps it is an SELinux permissions problem? Try setenforce 0 to see? > >> ----------------original message----------------- >> From:chaouche yacine [yacinechaouche at yahoo.com ] >> To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], >> dovecot at dovecot.org Date:Tue, 21 Mar 2017 13:06:14 +0000 (UTC) >> ------------------------------------------------- >> >> >>> Hi Ger, >>> >>> sieve_before should be a path to sieve script file, not to a directory. >>> in your configuration, you set sieve_before to >>> /var/lib/dovecot/sieve/before which is a directory. >>> >>> what you need to do is figure out which sieve script you'd like to >>> execute and its path rather. >>> If you think that default2.sieve is the right script then set >>> sieve_before to /var/lib/dovecot/sieve/before/default2.sieve >>> >>> -- Yassine. >>> >>> >>> >>> >>> On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa >>> Blarney wrote: >>> >>> >>> >>> >>> >>>> Hi All, >>>> [...] >>> >>>> plugin { >>>> [...] >>>> >>>> >>>> sieve_before = /var/lib/dovecot/sieve/before >>>> ................................. >>>> >>>> In /var/lib/dovecot/sieve/before I have : >>>> >>>> drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. >>>> >>>> -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin >>>> >>>> -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve >>>> >>>> default2.sieve is as follows: >>>> >>>> require ["fileinto"]; >>>> >>>> if allof (header :matches "subject" "*JUNK*") { >>>> >>>> fileinto "INBOX.Junk"; >>>> >>>> } >>> >> >> __________________________________________________ >> >> Please consider the environment before printing this email. >> Ger Hooton >> Systems Administrator >> Scoil Chro? ?osa Blarney. >> Blarney. >> Co. Cork >> > >__________________________________________________ Please consider the environment before printing this email. Ger Hooton Systems Administrator Scoil Chro? ?osa Blarney. Blarney. Co. Cork
Ger Hooton Scoil Chroí Íosa Blarney
2017-Mar-21 14:14 UTC
Problem with sieve_before[solved]
I did chmod -R 777 /var/lib/dovecot and it worked. I just need to figure out what the correct setting are. Thanks everyone //Ger ----------------original message----------------- From:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ] To:Robert Moskowitz [rgm at htt-consult.com ], chaouche yacine [yacinechaouche at yahoo.com ], dovecot at dovecot.org Date:Tue, 21 Mar 2017 14:05:17 +0000 -------------------------------------------------> > Thanks Robert, how do I do that? > > > > ----------------original message----------------- > From:Robert Moskowitz [rgm at htt-consult.com ] > To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], chaouche > yacine [yacinechaouche at yahoo.com ], dovecot at dovecot.org Date:Tue, 21 > Mar 2017 09:47:18 -0400 > ------------------------------------------------- > > >> >> >> On 03/21/2017 09:30 AM, Ger Hooton Scoil Chro? ?osa Blarney wrote: >>> >>> Hi Yassine, >>> That did not work, is there a way to see is the script is been run? >> >> Perhaps it is an SELinux permissions problem? Try setenforce 0 to see? >> >>> ----------------original message----------------- >>> From:chaouche yacine [yacinechaouche at yahoo.com ] >>> To:Ger Hooton Scoil Chro? ?osa Blarney [ghooton at scins.ie ], >>> dovecot at dovecot.org Date:Tue, 21 Mar 2017 13:06:14 +0000 (UTC) >>> ------------------------------------------------- >>> >>> >>>> Hi Ger, >>>> >>>> sieve_before should be a path to sieve script file, not to a directory. >>>> in your configuration, you set sieve_before to >>>> /var/lib/dovecot/sieve/before which is a directory. >>>> >>>> what you need to do is figure out which sieve script you'd like >>>> to execute and its path rather. >>>> If you think that default2.sieve is the right script then set >>>> sieve_before to /var/lib/dovecot/sieve/before/default2.sieve >>>> >>>> -- Yassine. >>>> >>>> >>>> >>>> >>>> On Tuesday, March 21, 2017 12:56 PM, Ger Hooton Scoil Chro? ?osa >>>> Blarney wrote: >>>> >>>> >>>> >>>> >>>> >>>>> Hi All, >>>>> [...] >>>> >>>>> plugin { >>>>> [...] >>>>> >>>>> >>>>> sieve_before = /var/lib/dovecot/sieve/before >>>>> ................................. >>>>> >>>>> In /var/lib/dovecot/sieve/before I have : >>>>> >>>>> drwxrwxrwx 3 mail mail 4096 Mar 20 23:47 .. >>>>> >>>>> -rw-rw-rw- 1 root root 195 Mar 21 09:57 default2.svbin >>>>> >>>>> -rwxrwxrwx 1 mail mail 157 Mar 21 11:12 default2.sieve >>>>> >>>>> default2.sieve is as follows: >>>>> >>>>> require ["fileinto"]; >>>>> >>>>> if allof (header :matches "subject" "*JUNK*") { >>>>> >>>>> fileinto "INBOX.Junk"; >>>>> >>>>> } >>>> >>> >>> __________________________________________________ >>> >>> Please consider the environment before printing this email. >>> Ger Hooton >>> Systems Administrator >>> Scoil Chro? ?osa Blarney. >>> Blarney. >>> Co. Cork >>> >> >> > > __________________________________________________ > > Please consider the environment before printing this email. > Ger Hooton > Systems Administrator > Scoil Chro? ?osa Blarney. > Blarney. > Co. Cork >__________________________________________________ Please consider the environment before printing this email. Ger Hooton Systems Administrator Scoil Chro? ?osa Blarney. Blarney. Co. Cork