Re: Sieve_default
Op 16/06/2018 om 02:14 schreef @lbutlr: On Jun 15, 2018, at 14:52, Reio Remma wrote: Did you try running /usr/lib/dovecot/sieve/sa-learn-spam.sh outside of the sieve script? Yes. And that works not also works if I take out the global defaults declaration I added. What does not work at all is the drfefault.sieve action. AFAICT it doesn’t even try to run. You should enable mail_debug=yes, which should log in detail what Sieve is doing. Regards, Stephan.
Re: Sieve_default
On Jun 15, 2018, at 14:52, Reio Remma wrote: > > Did you try running /usr/lib/dovecot/sieve/sa-learn-spam.sh outside of the > sieve script? Yes. And that works not also works if I take out the global defaults declaration I added. What does not work at all is the drfefault.sieve action. AFAICT it doesn’t even try to run. -- This is my signature. There are many like it, but this one is mine.
Re: Sieve_default
On 15.06.2018 19:39, @lbutlr wrote: After turning one bug, I am getting slightly more information: Jun 15 10:34:44 mail dovecot: imap(kreme): Error: program `/usr/lib/dovecot/sieve/sa-learn-spam.sh' was forcibly terminated with signal 15 Did you try running /usr/lib/dovecot/sieve/sa-learn-spam.sh outside of the sieve script?
Re: Sieve_default
On 13 Jun 2018, at 16:14, @lbutlr wrote: > On 13 Jun 2018, at 12:51, Sami Ketola wrote: >> Are you sure your sieve even gets executed? Anything in the logs? can you >> enable mail_debug=yes and try again? >> Can you post your doveconf -n? > > I am not sure. I’ve made a couple of changes (put the default script and > compiled script into their own folder and defined sieve_global), but still no > joy. In fact, things are worse now as the report scripts have stopped working: > > imap(kremels): Error: sieve: Execution of script > /usr/lib/dovecot/sieve/report-spam.sieve failed After turning one bug, I am getting slightly more information: Jun 15 10:33:57 mail dovecot: imap(kreme): Error: program `/usr/lib/dovecot/sieve/sa-learn-ham.sh' was forcibly terminated with signal 15 Jun 15 10:33:57 mail dovecot: imap(kreme): Error: sieve: pipe action: failed to pipe message to program `sa-learn-ham.sh': refer to server log for more information. [2018-06-15 10:33:57] Jun 15 10:33:57 mail dovecot: imap(kreme): Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-ham.sieve failed Jun 15 10:33:57 mail dovecot: imap(kreme): sieve: left message in mailbox 'INBOX' Jun 15 10:34:44 mail dovecot: imap(kreme): Error: program `/usr/lib/dovecot/sieve/sa-learn-spam.sh' was forcibly terminated with signal 15 Jun 15 10:34:44 mail dovecot: imap(kreme): Error: sieve: pipe action: failed to pipe message to program `sa-learn-spam.sh': refer to server log for more information. [2018-06-15 10:34:44] Jun 15 10:34:44 mail dovecot: imap(kreme): sieve: left message in mailbox ‘Junk' No mention of the default script at all
Re: Sieve_default
On 13 Jun 2018, at 12:51, Sami Ketola wrote: > Are you sure your sieve even gets executed? Anything in the logs? can you > enable mail_debug=yes and try again? > Can you post your doveconf -n? I am not sure. I’ve made a couple of changes (put the default script and compiled script into their own folder and defined sieve_global), but still no joy. In fact, things are worse now as the report scripts have stopped working: imap(kremels): Error: sieve: Execution of script /usr/lib/dovecot/sieve/report-spam.sieve failed # ls -ls /usr/lib/dovecot/sieve/ total 72 8 drwxr-xr-x 2 root wheel 512 Jun 13 11:42 global 8 -rw-r--r-- 1 root wheel 62 May 14 06:08 mark-read.sieve 8 -rw-r--r-- 1 root wheel 192 May 14 06:12 mark-read.svbin 8 -rwxr-xr-x 1 root wheel 314 Feb 12 20:10 report-ham.sieve 8 -rwxr-xr-x 1 root wheel 448 Feb 12 20:10 report-ham.svbin 8 -rwxr-xr-x 1 root wheel 199 Feb 12 20:10 report-spam.sieve 8 -rwxr-xr-x 1 root wheel 354 Feb 12 20:10 report-spam.svbin 8 -rwxr-xr-x 1 root wheel 53 Feb 12 20:12 sa-learn-ham.sh 8 -rwxr-xr-x 1 root wheel 54 Feb 12 20:12 sa-learn-spam.sh # 2.2.35 (b1cb664): /usr/local/etc/dovecot/dovecot.conf # Pigeonhole version 0.4.23 (b2e41927) # OS: FreeBSD 11.1-RELEASE-p4 i386 # Hostname: mail.covisp.net auth_failure_delay = 5 secs auth_mechanisms = PLAIN LOGIN default_client_limit = 4096 default_process_limit = 1024 default_vsz_limit = 768 M disable_plaintext_auth = no first_valid_uid = 89 imap_id_log = * lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=<%u> %r %m %c mail_location = maildir:~/Maildir mail_max_userip_connections = 90 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = mailbox Archive { auto = subscribe special_use = \Archive } mailbox Drafts { special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam username_filter = !*@* } passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve imapsieve_mailbox3_causes = COPY imapsieve_mailbox3_name = Archive sieve = file:~/.sieve;active=~/.active_sieve sieve_default = /usr/lib/dovecot/sieve/global/default.sieve sieve_default_name = spamassassin sieve_global = /usr/lib/dovecot/sieve/global/ sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 995 ssl = yes } } ssl_cert =
Re: Sieve_default
> On 13 Jun 2018, at 20.26, @lbutlr wrote: > > > >> On 12 Jun 2018, at 01:23, Alex JOST wrote: >> >> Am 12.06.2018 um 01:01 schrieb @lbutlr: >>> I created a sieve_default to move any spam-tagged messages into the Junk >>> mailbox automatically, but it doesn’t appear to be working (though the >>> other imapsieve_mailbox… scripts are working). >>> From doveconf -n >>> plugin { >>> imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve >>> imapsieve_mailbox1_causes = COPY >>> imapsieve_mailbox1_name = Junk >>> imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve >>> imapsieve_mailbox2_causes = COPY >>> imapsieve_mailbox2_from = Junk >>> imapsieve_mailbox2_name = * >>> imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve >>> imapsieve_mailbox3_causes = COPY >>> imapsieve_mailbox3_name = Archive >>> sieve = file:~/.sieve;active=~/.active_sieve >>> sieve_default = /usr/lib/dovecot/sieve/default.sieve >>> sieve_default_name = spamassassin >>> sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment >>> sieve_pipe_bin_dir = /usr/lib/dovecot/sieve >>> sieve_plugins = sieve_imapsieve sieve_extprograms >>> } >>> And >>> # cat /usr/lib/dovecot/sieve/default.sieve >>> if header :contains "X-spam-flag" "YES" { >>> fileinto "Junk"; >>> } >>> There are no user sieve files >>> # find /home -name "*sieve*" -type f >>> # >>> The x-spam-flag header in the message in my mailbox is definitely there and >>> definitely set to yes. >> >> I think you need to enable the 'fileinto' extension via 'require'. And did >> you pre-compile the script? > > I added > > require "fileinto”; > > To default.sieve > > I did not pre-compile the script, but according to the docs that should not > prevent it from working. > > Spam, messages are still not being filed in to Junk, however. Are you sure your sieve even gets executed? Anything in the logs? can you enable mail_debug=yes and try again? Can you post your doveconf -n? Sami
Re: Sieve_default
> On 13 Jun 2018, at 20:26, @lbutlr wrote: > > I added > > require "fileinto”; > > To default.sieve > > I did not pre-compile the script, but according to the docs that should not > prevent it from working. > > Spam, messages are still not being filed in to Junk, however. Anything in the logs?
Re: Sieve_default
> On 12 Jun 2018, at 01:23, Alex JOST wrote: > > Am 12.06.2018 um 01:01 schrieb @lbutlr: >> I created a sieve_default to move any spam-tagged messages into the Junk >> mailbox automatically, but it doesn’t appear to be working (though the other >> imapsieve_mailbox… scripts are working). >> From doveconf -n >> plugin { >> imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve >> imapsieve_mailbox1_causes = COPY >> imapsieve_mailbox1_name = Junk >> imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve >> imapsieve_mailbox2_causes = COPY >> imapsieve_mailbox2_from = Junk >> imapsieve_mailbox2_name = * >> imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve >> imapsieve_mailbox3_causes = COPY >> imapsieve_mailbox3_name = Archive >> sieve = file:~/.sieve;active=~/.active_sieve >> sieve_default = /usr/lib/dovecot/sieve/default.sieve >> sieve_default_name = spamassassin >> sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment >> sieve_pipe_bin_dir = /usr/lib/dovecot/sieve >> sieve_plugins = sieve_imapsieve sieve_extprograms >> } >> And >> # cat /usr/lib/dovecot/sieve/default.sieve >> if header :contains "X-spam-flag" "YES" { >> fileinto "Junk"; >> } >> There are no user sieve files >> # find /home -name "*sieve*" -type f >> # >> The x-spam-flag header in the message in my mailbox is definitely there and >> definitely set to yes. > > I think you need to enable the 'fileinto' extension via 'require'. And did > you pre-compile the script? I added require "fileinto”; To default.sieve I did not pre-compile the script, but according to the docs that should not prevent it from working. Spam, messages are still not being filed in to Junk, however.
Re: Sieve_default
Am 12.06.2018 um 01:01 schrieb @lbutlr: I created a sieve_default to move any spam-tagged messages into the Junk mailbox automatically, but it doesn’t appear to be working (though the other imapsieve_mailbox… scripts are working). From doveconf -n plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve imapsieve_mailbox3_causes = COPY imapsieve_mailbox3_name = Archive sieve = file:~/.sieve;active=~/.active_sieve sieve_default = /usr/lib/dovecot/sieve/default.sieve sieve_default_name = spamassassin sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } And # cat /usr/lib/dovecot/sieve/default.sieve if header :contains "X-spam-flag" "YES" { fileinto "Junk"; } There are no user sieve files # find /home -name "*sieve*" -type f # The x-spam-flag header in the message in my mailbox is definitely there and definitely set to yes. I think you need to enable the 'fileinto' extension via 'require'. And did you pre-compile the script? -- Alex JOST
Sieve_default
I created a sieve_default to move any spam-tagged messages into the Junk mailbox automatically, but it doesn’t appear to be working (though the other imapsieve_mailbox… scripts are working). From doveconf -n plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve imapsieve_mailbox3_causes = COPY imapsieve_mailbox3_name = Archive sieve = file:~/.sieve;active=~/.active_sieve sieve_default = /usr/lib/dovecot/sieve/default.sieve sieve_default_name = spamassassin sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } And # cat /usr/lib/dovecot/sieve/default.sieve if header :contains "X-spam-flag" "YES" { fileinto "Junk"; } There are no user sieve files # find /home -name "*sieve*" -type f # The x-spam-flag header in the message in my mailbox is definitely there and definitely set to yes.