Mr Nicolas Belan
2018-Mar-22 14:30 UTC
How to stop sieve processing to skip sieve_after scripts ?
Hello the list, I am trying to achieve filter processing using sieve, but i am not sure I can do what I want. I want to let the user decide to use my filtering script (sieve_after) or not.According to the documentation, i am trying to stop processing in user sieve script, but processing continue. I am using dovecot 2.2 (CentOS). My sieve configuration is:plugin { ? sieve = /var/vmail/%d/%n/%n.sieve ? sieve_before = /etc/dovecot/sieve/global-before ? sieve_after = /etc/dovecot/sieve/global [...]} 'sieve' is the filter script created by users. When trying to stop processing, it is generated by roundcube like:# rule:[deliver to mailbox] if anyof (true) { ?? ?stop; } 'sieve_after' is the filter which handles the spam processing (fileinto Junk). But the processing continue until all sieve filters are processed: Mar 22 14:50:23 lda(user at example.com): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=Mar 22 14:50:23 lda(user at example.com): Debug: Destination address: user at example.com (source: -a parameter) Mar 22 14:50:23 lda(user at example.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Mar 22 14:50:23 lda(user at example.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts. Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed before user's personal Sieve script(1): /etc/dovecot/sieve/global-before Mar 22 14:50:23 lda(user at example.com): Debug: sieve: using the following location for user's Sieve script: /var/vmail/example.com/user/user.sieve;name=main script Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed after user's Sieve script(3): /etc/dovecot/sieve/global Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 1 of 3 from /etc/dovecot/sieve/global-before Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script /etc/dovecot/sieve/global-before Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary /etc/dovecot/sieve/global-before.svbin successfully loaded Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not saving binary /etc/dovecot/sieve/global-before.svbin, because it is already stored Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script from /etc/dovecot/sieve/global-before.svbin Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 2 of 3 from /var/vmail/example.com/user/user.sieve;name=main script Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script /var/vmail/example.com/user/user.sieve;name=main script Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary /var/vmail/example.com/user/user.svbin successfully loaded Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not saving binary /var/vmail/example.com/user/user.svbin, because it is already stored Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script from /var/vmail/example.com/user/user.svbin Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 3 of 3 from /etc/dovecot/sieve/global Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script /etc/dovecot/sieve/global Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary /etc/dovecot/sieve/global.svbin successfully loaded Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not saving binary /etc/dovecot/sieve/global.svbin, because it is already stored Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script from /etc/dovecot/sieve/global.svbin Mar 22 14:50:23 lda(user at example.com): Debug: Namespace : Using permissions from /var/vmail/example.com/user/Maildir: mode=0700 gid=default Mar 22 14:50:23 lda(user at example.com): Info: sieve: msgid=<cm.0045046409888.jyshukd.kidudykyhi.r at cmail19.com>: stored mail into mailbox 'Courrier ind?sirable' I would like to stop processing afterMar 22 14:50:23 lda(user at example.com): Debug: sieve: using the following location for user's Sieve script: /var/vmail/example.com/user/user.sieve;name=main scriptAt the end, I do not want mail to be delivered into Junk, but into INBOX.. Is it possible ? Perhaps a sieve, sieve2 setting exists ? (like sieve_before, sieve_before2 ...) Thank you for your help, ideas :) Best regards, Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180322/7b9822dc/attachment.html>
Stephan Bosch
2018-Mar-22 18:29 UTC
How to stop sieve processing to skip sieve_after scripts ?
Op 3/22/2018 om 3:30 PM schreef Mr Nicolas Belan:> Hello the list, > > I am trying to achieve filter processing using sieve, but i am not > sure I can do what I want. > > I want to let the user decide to use my filtering script (sieve_after) > or not. > According to the documentation, i am trying to stop processing in user > sieve script, but processing continue. > > I am using dovecot 2.2 (CentOS). > > My sieve configuration is: > plugin { > ? sieve = /var/vmail/%d/%n/%n.sieve > ? sieve_before = /etc/dovecot/sieve/global-before > ? sieve_after = /etc/dovecot/sieve/global > [...] > } > > 'sieve' is the filter script created by users. > When trying to stop processing, it is generated by roundcube like: > # rule:[deliver to mailbox] > if anyof (true) > { > ?? ?stop; > } > > 'sieve_after' is the filter which handles the spam processing > (fileinto Junk). > > But the processing continue until all sieve filters are processed: > > Mar 22 14:50:23 lda(user at example.com): Debug: none: root=, index=, > indexpvt=, control=, inbox=, alt> Mar 22 14:50:23 lda(user at example.com): Debug: Destination address: > user at example.com (source: -a parameter) > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: Pigeonhole > version 0.4.2 initializing > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: include: > sieve_global_dir is not set; it is currently not possible to include > `:global' scripts. > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed before > user's personal Sieve script(1): /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: using the > following location for user's Sieve script: > /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed after > user's Sieve script(3): /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 1 > of 3 from /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /etc/dovecot/sieve/global-before.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /etc/dovecot/sieve/global-before.svbin, because it is > already stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /etc/dovecot/sieve/global-before.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 2 > of 3 from /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /var/vmail/example.com/user/user.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /var/vmail/example.com/user/user.svbin, because it is > already stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /var/vmail/example.com/user/user.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 3 > of 3 from /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /etc/dovecot/sieve/global.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /etc/dovecot/sieve/global.svbin, because it is already > stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /etc/dovecot/sieve/global.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: Namespace : Using > permissions from /var/vmail/example.com/user/Maildir: mode=0700 > gid=default > Mar 22 14:50:23 lda(user at example.com): Info: sieve: > msgid=<cm.0045046409888.jyshukd.kidudykyhi.r at cmail19.com>: stored mail > into mailbox 'Courrier ind?sirable' > > I would like to stop processing after > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: using the > following location for user's Sieve script: > /var/vmail/example.com/user/user.sieve;name=main script > At the end, I do not want mail to be delivered into Junk, but into INBOX.. > > Is it possible ? > Perhaps a sieve, sieve2 setting exists ? (like sieve_before, > sieve_before2 ...)Sieve processing continues into the next script in the sequence as long as an (implicit) keep is active. So, when you want to halt the sequence, but have the message filed into INBOX, you need to get the implicit keep canceled and end the script: e.g. do { fileinto "INBOX"; stop; } Regards, Stephan
Alex JOST
2018-Mar-23 08:01 UTC
How to stop sieve processing to skip sieve_after scripts ?
Am 22.03.2018 um 15:30 schrieb Mr Nicolas Belan:> Hello the list, > > I am trying to achieve filter processing using sieve, but i am not sure I can do what I want. > I want to let the user decide to use my filtering script (sieve_after) or not.According to the documentation, i am trying to stop processing in user sieve script, but processing continue.sieve_default might be the better approach to this. It uses your script until the user defines his own script. -- Alex JOST
Mr Nicolas Belan
2018-Mar-23 09:31 UTC
How to stop sieve processing to skip sieve_after scripts ?
Hi, sieve_default shoud be good, but roundcube set an empty sieve script if a user removed its script.So, until the user creates its first script, it is working, but never called after. That's why I choose to use sieve_after. Regards,Nicolas Le vendredi 23 mars 2018 ? 09:03:16 UTC+1, Alex JOST <jost+lists at dimejo.at> a ?crit : Am 22.03.2018 um 15:30 schrieb Mr Nicolas Belan:> Hello the list, > > I am trying to achieve filter processing using sieve, but i am not sure I can do what I want. > I want to let the user decide to use my filtering script (sieve_after) or not.According to the documentation, i am trying to stop processing in user sieve script, but processing continue.sieve_default might be the better approach to this. It uses your script until the user defines his own script. -- Alex JOST -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180323/4a0113d0/attachment.html>
Mr Nicolas Belan
2018-Mar-23 09:39 UTC
How to stop sieve processing to skip sieve_after scripts ?
Hi, ok, so I have to 'fileinto' AND stop processing.I thought that just 'stop' does the trick. I am trying that, thank you Nicolas. Le jeudi 22 mars 2018 ? 19:29:15 UTC+1, Stephan Bosch <stephan at rename-it.nl> a ?crit : Op 3/22/2018 om 3:30 PM schreef Mr Nicolas Belan:> Hello the list, > > I am trying to achieve filter processing using sieve, but i am not > sure I can do what I want. > > I want to let the user decide to use my filtering script (sieve_after) > or not. > According to the documentation, i am trying to stop processing in user > sieve script, but processing continue. > > I am using dovecot 2.2 (CentOS). > > My sieve configuration is: > plugin { > ? sieve = /var/vmail/%d/%n/%n.sieve > ? sieve_before = /etc/dovecot/sieve/global-before > ? sieve_after = /etc/dovecot/sieve/global > [...] > } > > 'sieve' is the filter script created by users. > When trying to stop processing, it is generated by roundcube like: > # rule:[deliver to mailbox] > if anyof (true) > { > ?? ?stop; > } > > 'sieve_after' is the filter which handles the spam processing > (fileinto Junk). > > But the processing continue until all sieve filters are processed: > > Mar 22 14:50:23 lda(user at example.com): Debug: none: root=, index=, > indexpvt=, control=, inbox=, alt> Mar 22 14:50:23 lda(user at example.com): Debug: Destination address: > user at example.com (source: -a parameter) > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: Pigeonhole > version 0.4.2 initializing > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: include: > sieve_global_dir is not set; it is currently not possible to include > `:global' scripts. > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed before > user's personal Sieve script(1): /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: using the > following location for user's Sieve script: > /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executed after > user's Sieve script(3): /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 1 > of 3 from /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /etc/dovecot/sieve/global-before > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /etc/dovecot/sieve/global-before.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /etc/dovecot/sieve/global-before.svbin, because it is > already stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /etc/dovecot/sieve/global-before.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 2 > of 3 from /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /var/vmail/example.com/user/user.sieve;name=main script > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /var/vmail/example.com/user/user.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /var/vmail/example.com/user/user.svbin, because it is > already stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /var/vmail/example.com/user/user.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: opening script 3 > of 3 from /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: loading script > /etc/dovecot/sieve/global > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: script binary > /etc/dovecot/sieve/global.svbin successfully loaded > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: binary save: not > saving binary /etc/dovecot/sieve/global.svbin, because it is already > stored > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: executing script > from /etc/dovecot/sieve/global.svbin > Mar 22 14:50:23 lda(user at example.com): Debug: Namespace : Using > permissions from /var/vmail/example.com/user/Maildir: mode=0700 > gid=default > Mar 22 14:50:23 lda(user at example.com): Info: sieve: > msgid=<cm.0045046409888.jyshukd.kidudykyhi.r at cmail19.com>: stored mail > into mailbox 'Courrier ind?sirable' > > I would like to stop processing after > Mar 22 14:50:23 lda(user at example.com): Debug: sieve: using the > following location for user's Sieve script: > /var/vmail/example.com/user/user.sieve;name=main script > At the end, I do not want mail to be delivered into Junk, but into INBOX.. > > Is it possible ? > Perhaps a sieve, sieve2 setting exists ? (like sieve_before, > sieve_before2 ...)Sieve processing continues into the next script in the sequence as long as an (implicit) keep is active. So, when you want to halt the sequence, but have the message filed into INBOX, you need to get the implicit keep canceled and end the script: e.g. do { fileinto "INBOX"; stop; } Regards, Stephan -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180323/dfdd6877/attachment.html>