Re: Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-25 Thread gilles
June 25, 2021 5:08 AM, "Samuel Banya"  wrote:

> 
> [...]
> 
> Here is the output of running the following command in 
> '/usr/local/dovecot/sieve' as the 'root'
> user on the box, but received the following message:
> #+BEGIN_SRC bash
> l# sievec report-ham.sieve
> report-ham: line 1: error: require command: unknown Sieve capability 
> `vnd.dovecot.pipe'.
> report-ham: line 1: error: require command: unknown Sieve capability 
> `imapsieve'.
> report-ham: line 15: error: unknown command 'pipe' (only reported once at 
> first occurrence).
> report-ham: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
> # sievec report-spam.sieve
> report-spam: line 1: error: require command: unknown Sieve capability 
> `vnd.dovecot.pipe'.
> report-spam: line 1: error: require command: unknown Sieve capability 
> `imapsieve'.
> report-spam: line 7: error: unknown command 'pipe' (only reported once at 
> first occurrence).
> report-spam: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'
> #+END_SRC
> 
> Is there anything else that can be done?
> 

Are you sure that you installed the dovecot-pigeonhole and didn't miss that 
step ?


> Don't mean to be that guy, but I get the feeling that it might have to be an 
> OpenBSD issue in terms
> of the sievec package, or the Dovecot release.
> 

It is very doubtful.

Not only a lot of people are using it and giving feedback about their working 
setup,
but I have also reinstalled a mail server from scratch last week and since I 
have an
issue remembering the dovecot bits, I used the guide as reference.

Maybe there's an issue in OpenBSD or the guide and we somehow all dodged it, 
but I'd
assume an error on your side to be more likely at this point :-)


> Please let me know what I could do to further troubleshoot the issue.
> 

make sure dovecot-pigeonhole is installed and if that's the case, I'd uninstall 
both
dovecot and dovecot-pigeonhole, move /etc/dovecot to /etc/dovecot.BAK, then go 
again
from scratch in case you messed up something in the process.

Gilles



Re: Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-25 Thread Stuart Henderson
On 2021-06-25, gil...@poolp.org  wrote:
> June 25, 2021 5:08 AM, "Samuel Banya"  wrote:
>
>> 
>> [...]
>> 
>> Here is the output of running the following command in 
>> '/usr/local/dovecot/sieve' as the 'root'
>> user on the box, but received the following message:
>> #+BEGIN_SRC bash
>> l# sievec report-ham.sieve
>> report-ham: line 1: error: require command: unknown Sieve capability 
>> `vnd.dovecot.pipe'.
>> report-ham: line 1: error: require command: unknown Sieve capability 
>> `imapsieve'.
>> report-ham: line 15: error: unknown command 'pipe' (only reported once at 
>> first occurrence).
>> report-ham: error: validation failed.
>> sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
>> # sievec report-spam.sieve
>> report-spam: line 1: error: require command: unknown Sieve capability 
>> `vnd.dovecot.pipe'.
>> report-spam: line 1: error: require command: unknown Sieve capability 
>> `imapsieve'.
>> report-spam: line 7: error: unknown command 'pipe' (only reported once at 
>> first occurrence).
>> report-spam: error: validation failed.
>> sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'
>> #+END_SRC
>> 
>> Is there anything else that can be done?
>> 
>
> Are you sure that you installed the dovecot-pigeonhole and didn't miss that 
> step ?
>
>
>> Don't mean to be that guy, but I get the feeling that it might have to be an 
>> OpenBSD issue in terms
>> of the sievec package, or the Dovecot release.
>> 
>
> It is very doubtful.
>
> Not only a lot of people are using it and giving feedback about their working 
> setup,
> but I have also reinstalled a mail server from scratch last week and since I 
> have an
> issue remembering the dovecot bits, I used the guide as reference.
>
> Maybe there's an issue in OpenBSD or the guide and we somehow all dodged it, 
> but I'd
> assume an error on your side to be more likely at this point :-)
>
>
>> Please let me know what I could do to further troubleshoot the issue.
>> 
>
> make sure dovecot-pigeonhole is installed and if that's the case, I'd 
> uninstall both
> dovecot and dovecot-pigeonhole, move /etc/dovecot to /etc/dovecot.BAK, then 
> go again
> from scratch in case you messed up something in the process.
>
> Gilles
>
>

I'm only using Dovecot with Postfix not OpenSMTPd, but don't think there
will be any difference to the sieve side of things and that works fine
here.

I have Dovecot on multiple OpenBSD setups, including with sieve/imapsieve,
SSH-based dsync (replicator), FTS (I use solr; dovecot-fts-xapian works too).
The only problem I'm aware of with Dovecot and OpenBSD is with TLS-based
dsync which doesn't cope with libressl very well (the main part of
Dovecot has no problem it's just with replicator).




Re: Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-24 Thread Samuel Banya
Hello Stuart,

Just wanted to preface my response with the fact that I use Emacs for my notes 
hence you'll see source blocks later with "#+BEGIN_SRC".

Regarding your previous question:
Do you have:
*mail_plugins = $mail_plugins imap_sieve**

in the "protocol imap { ... }" block?

Answer:
Yes, I do have that exact block within /etc/dovecot/conf.d/20-imap.conf.

I checked the documentation you have provided. The only thing that is different 
is that I have 'Junk' instead of 'Spam' like the documentation:
https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve/

So, just for kicks, I tried to just change it accordingly so here's the 
"BEFORE" and "AFTER" my changes to the ''/etc/dovecot/conf.d/90-plugin.conf" 
file:

I then tried running the following file as the root user on the box:

<2021-06-24 Thu 22:48>: With this in mind, this is my revised changes in 
'/etc/dovecot/conf.d/90-plugin.conf'

BEFORE:
#+BEGIN_SRC bash
##
## Plugin settings
##

# All wanted plugins must be listed in mail_plugins setting before any of the
# settings take effect. See  for list of plugins and
# their configuration. Note that %variable expansion is done for all values.

plugin {
  sieve_plugins = sieve_imapsieve sieve_extprograms

  sieve_global_extensions = +vnd.dovecot.environment +vnd.dovecot.debug 
+vnd.dovecot.pipe

  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_before = 
file:/usr/local/lib/dovecot/sieve/report-spam.sieve

  imapsieve_mailbox2_name = *
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  imapsieve_mailbox3_name = Inbox
  imapsieve_mailbox3_causes = APPEND
  imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
}
#+END_SRC

AFTER:
#+BEGIN_SRC bash
##
## Plugin settings
##

# All wanted plugins must be listed in mail_plugins setting before any of the
# settings take effect. See  for list of plugins and
# their configuration. Note that %variable expansion is done for all values.

plugin {
  sieve_plugins = sieve_imapsieve sieve_extprograms

  sieve_global_extensions = +vnd.dovecot.environment +vnd.dovecot.debug 
+vnd.dovecot.pipe

  imapsieve_mailbox1_name = Spam
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_before = 
file:/usr/local/lib/dovecot/sieve/report-spam.sieve

  imapsieve_mailbox2_name = *
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  imapsieve_mailbox3_name = Inbox
  imapsieve_mailbox3_causes = APPEND
  imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
}
#+END_SRC

Here is the output of running the following command in 
'/usr/local/dovecot/sieve' as the 'root' user on the box, but received the 
following message:
#+BEGIN_SRC bash
l# sievec report-ham.sieve
report-ham: line 1: error: require command: unknown Sieve capability 
`vnd.dovecot.pipe'.
report-ham: line 1: error: require command: unknown Sieve capability 
`imapsieve'.
report-ham: line 15: error: unknown command 'pipe' (only reported once at first 
occurrence).
report-ham: error: validation failed.
sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
# sievec report-spam.sieve
report-spam: line 1: error: require command: unknown Sieve capability 
`vnd.dovecot.pipe'.
report-spam: line 1: error: require command: unknown Sieve capability 
`imapsieve'.
report-spam: line 7: error: unknown command 'pipe' (only reported once at first 
occurrence).
report-spam: error: validation failed.
sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'
#+END_SRC

Is there anything else that can be done?

Don't mean to be that guy, but I get the feeling that it might have to be an 
OpenBSD issue in terms of the sievec package, or the Dovecot release.

Please let me know what I could do to further troubleshoot the issue.

Thanks,

Sam

On Mon, Jun 21, 2021, at 11:18 AM, Stuart Henderson wrote:
> On 2021-06-19, Samuel Banya  wrote:
> > Hello everyone,
> >
> > I've been following the "poolp" guide on how to deploy an email server on 
> > OpenBSD:
> > - 
> > https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/
> >
> > I'm currently at the very end of the guide in which he is using sieve with 
> > Dovecot to do some final filtering.
> >
> > The unfortunate thing is that when I run these two commands in the 
> > '/usr/local/lib/dovecot/sieve' directory:
> > sievec report-ham.sieve
> > sievec report-spam.sieve
> >
> > I'm getting the following error:
> > # sievec report-ham.sieve
> > report-ham: line 1: error: require command: unknown Sieve capability 
> > `vnd.dovecot.pipe'.
> > report-ham: line 1: error: require command: unknown Sieve capability 
> > `

Re: Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-21 Thread Stuart Henderson
On 2021-06-19, Samuel Banya  wrote:
> Hello everyone,
>
> I've been following the "poolp" guide on how to deploy an email server on 
> OpenBSD:
> - 
> https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/
>
> I'm currently at the very end of the guide in which he is using sieve with 
> Dovecot to do some final filtering.
>
> The unfortunate thing is that when I run these two commands in the 
> '/usr/local/lib/dovecot/sieve' directory:
> sievec report-ham.sieve
> sievec report-spam.sieve
>
> I'm getting the following error:
> # sievec report-ham.sieve
> report-ham: line 1: error: require command: unknown Sieve capability 
> `vnd.dovecot.pipe'.
> report-ham: line 1: error: require command: unknown Sieve capability 
> `imapsieve'.
> report-ham: line 15: error: unknown command 'pipe' (only reported once at 
> first occurrence).
> report-ham: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
> # sievec report-spam.sieve
> report-spam: line 1: error: require command: unknown Sieve capability 
> `vnd.dovecot.pipe'.
> report-spam: line 1: error: require command: unknown Sieve capability 
> `imapsieve'.
> report-spam: line 7: error: unknown command 'pipe' (only reported once at 
> first occurrence).
> report-spam: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'

Do you have

mail_plugins = $mail_plugins imap_sieve

in the "protocol imap { ... }" block?

> What's interesting is that this same post has the same exact error, and I 
> tried his workaround which did NOT work unfortunately:
> - http://dovecot.2317879.n4.nabble.com/sieve-compile-error-td70414.html

If that doesn't help, rather than looking at forum posts, try the documentation

https://wiki.dovecot.org/Pigeonhole/Sieve/Plugins/IMAPSieve
https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve/




Re: Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-20 Thread Adriano Barbosa
Em sáb., 19 de jun. de 2021 às 19:56, Samuel Banya 
escreveu:

> Hello everyone,
>
> I've been following the "poolp" guide on how to deploy an email server on
> OpenBSD:
> -
> https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/
>
> I'm currently at the very end of the guide in which he is using sieve with
> Dovecot to do some final filtering.
>
> The unfortunate thing is that when I run these two commands in the
> '/usr/local/lib/dovecot/sieve' directory:
> sievec report-ham.sieve
> sievec report-spam.sieve
>
> I'm getting the following error:
> # sievec report-ham.sieve
> report-ham: line 1: error: require command: unknown Sieve capability
> `vnd.dovecot.pipe'.
> report-ham: line 1: error: require command: unknown Sieve capability
> `imapsieve'.
> report-ham: line 15: error: unknown command 'pipe' (only reported once at
> first occurrence).
> report-ham: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
> # sievec report-spam.sieve
> report-spam: line 1: error: require command: unknown Sieve capability
> `vnd.dovecot.pipe'.
> report-spam: line 1: error: require command: unknown Sieve capability
> `imapsieve'.
> report-spam: line 7: error: unknown command 'pipe' (only reported once at
> first occurrence).
> report-spam: error: validation failed.
> sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'
>
> What's interesting is that this same post has the same exact error, and I
> tried his workaround which did NOT work unfortunately:
> - http://dovecot.2317879.n4.nabble.com/sieve-compile-error-td70414.html
>
> This is what was present BEFORE my changes in '
> plugin {
>   sieve_plugins = sieve_imapsieve sieve_extprograms
>
>   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
>
>   imapsieve_mailbox1_name = Junk
>   imapsieve_mailbox1_causes = COPY APPEND
>   imapsieve_mailbox1_before =
> file:/usr/local/lib/dovecot/sieve/report-spam.sieve
>
>   imapsieve_mailbox2_name = *
>   imapsieve_mailbox2_from = Junk
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_before =
> file:/usr/local/lib/dovecot/sieve/report-ham.sieve
>
>   imapsieve_mailbox3_name = Inbox
>   imapsieve_mailbox3_causes = APPEND
>   imapsieve_mailbox3_before =
> file:/usr/local/lib/dovecot/sieve/report-ham.sieve
>
>   sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
> }
>
> This is what was present AFTER my changes in
> '/etc/dovecot/conf.d/90-plugin.conf' (aka I followed this post's workaround
> http://dovecot.2317879.n4.nabble.com/sieve-compile-error-td70414.html):
> plugin {
>   sieve_plugins = sieve_imapsieve sieve_extprograms
>
>   sieve_global_extensions = +vnd.dovecot.environment +vnd.dovecot.debug
> +vnd.dovecot.pipe
>
>   imapsieve_mailbox1_name = Junk
>   imapsieve_mailbox1_causes = COPY APPEND
>   imapsieve_mailbox1_before =
> file:/usr/local/lib/dovecot/sieve/report-spam.sieve
>
>   imapsieve_mailbox2_name = *
>   imapsieve_mailbox2_from = Junk
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_before =
> file:/usr/local/lib/dovecot/sieve/report-ham.sieve
>
>   imapsieve_mailbox3_name = Inbox
>   imapsieve_mailbox3_causes = APPEND
>   imapsieve_mailbox3_before =
> file:/usr/local/lib/dovecot/sieve/report-ham.sieve
>
>   sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
> }


Did you restart dovecot between modifying this file and running sievec?


>
> Any ideas on what I can do?
>
> Thanks,
>
> ~ Sam
>
> --
Adriano Barbosa
Sent from my phone. Sorry for typos.


Question Regarding The 'poolp' Guide On How To Deploy A Mail Server's Last Portion Regarding Dovecot With 'sieve' Scripts

2021-06-19 Thread Samuel Banya
Hello everyone,

I've been following the "poolp" guide on how to deploy an email server on 
OpenBSD:
- 
https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/

I'm currently at the very end of the guide in which he is using sieve with 
Dovecot to do some final filtering.

The unfortunate thing is that when I run these two commands in the 
'/usr/local/lib/dovecot/sieve' directory:
sievec report-ham.sieve
sievec report-spam.sieve

I'm getting the following error:
# sievec report-ham.sieve
report-ham: line 1: error: require command: unknown Sieve capability 
`vnd.dovecot.pipe'.
report-ham: line 1: error: require command: unknown Sieve capability 
`imapsieve'.
report-ham: line 15: error: unknown command 'pipe' (only reported once at first 
occurrence).
report-ham: error: validation failed.
sievec(root): Fatal: failed to compile sieve script 'report-ham.sieve'
# sievec report-spam.sieve
report-spam: line 1: error: require command: unknown Sieve capability 
`vnd.dovecot.pipe'.
report-spam: line 1: error: require command: unknown Sieve capability 
`imapsieve'.
report-spam: line 7: error: unknown command 'pipe' (only reported once at first 
occurrence).
report-spam: error: validation failed.
sievec(root): Fatal: failed to compile sieve script 'report-spam.sieve'

What's interesting is that this same post has the same exact error, and I tried 
his workaround which did NOT work unfortunately:
- http://dovecot.2317879.n4.nabble.com/sieve-compile-error-td70414.html

This is what was present BEFORE my changes in '
plugin {
  sieve_plugins = sieve_imapsieve sieve_extprograms

  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment

  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_before = 
file:/usr/local/lib/dovecot/sieve/report-spam.sieve

  imapsieve_mailbox2_name = *
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  imapsieve_mailbox3_name = Inbox
  imapsieve_mailbox3_causes = APPEND
  imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
}

This is what was present AFTER my changes in 
'/etc/dovecot/conf.d/90-plugin.conf' (aka I followed this post's workaround
http://dovecot.2317879.n4.nabble.com/sieve-compile-error-td70414.html):
plugin {
  sieve_plugins = sieve_imapsieve sieve_extprograms

  sieve_global_extensions = +vnd.dovecot.environment +vnd.dovecot.debug 
+vnd.dovecot.pipe

  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_before = 
file:/usr/local/lib/dovecot/sieve/report-spam.sieve

  imapsieve_mailbox2_name = *
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  imapsieve_mailbox3_name = Inbox
  imapsieve_mailbox3_causes = APPEND
  imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve

  sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
}

Any ideas on what I can do?

Thanks,

~ Sam