Blame


1 eab566c6 2022-09-17 jrmu version=pmwiki-2.2.130 ordered=1 urlencoded=1
2 7feb3d77 2022-12-31 jrmu agent=Mozilla/5.0 (X11; OpenBSD amd64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.14
3 7feb3d77 2022-12-31 jrmu author=mkf
4 eab566c6 2022-09-17 jrmu charset=UTF-8
5 7feb3d77 2022-12-31 jrmu csum=style 2
6 eab566c6 2022-09-17 jrmu ctime=1663292685
7 7feb3d77 2022-12-31 jrmu host=198.251.81.133
8 eab566c6 2022-09-17 jrmu name=Dovecot.Pigeonhole
9 7feb3d77 2022-12-31 jrmu rev=3
10 eab566c6 2022-09-17 jrmu targets=
11 7feb3d77 2022-12-31 jrmu text=This is useful in combination with @@rspamd@@%0a%0aCopied from [[https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/|here]]%0a%0a!! Installation%0a[@%0a$ doas pkg_add dovecot-pigeonhole%0a@]%0a%0a!! Setup%0a%0aOn @@/etc/dovecot/20-imap.conf@@:%0a[@%0aprotocol imap {%0a mail_plugins = $mail_plugins imap_sieve%0a}%0a@]%0a%0aOn @@/etc/dovecot/90-plugin.conf@@:%0a[@%0aplugin {%0a sieve_plugins = sieve_imapsieve sieve_extprograms%0a sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment%0a%0a imapsieve_mailbox1_name = Junk%0a imapsieve_mailbox1_causes = COPY APPEND%0a imapsieve_mailbox1_before = file:/usr/local/lib/dovecot/sieve/report-spam.sieve%0a%0a imapsieve_mailbox2_name = *%0a imapsieve_mailbox2_from = Junk%0a imapsieve_mailbox2_causes = COPY%0a imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve%0a%0a imapsieve_mailbox3_name = Inbox%0a imapsieve_mailbox3_causes = APPEND%0a imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve%0a%0a sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve%0a}%0a@]%0a%0aOn @@/usr/local/lib/dovecot/sieve/report-ham.sieve@@:%0a[@%0arequire ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];%0a%0aif environment :matches "imap.mailbox" "*" {%0a set "mailbox" "${1}";%0a}%0a%0aif string "${mailbox}" "Trash" {%0a stop;%0a}%0a%0aif environment :matches "imap.user" "*" {%0a set "username" "${1}";%0a}%0a%0apipe :copy "sa-learn-ham.sh" [ "${username}" ];%0a@]%0a%0aOn @@/usr/local/lib/dovecot/sieve/report-spam.sieve@@:%0a[@%0arequire ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];%0a%0aif environment :matches "imap.user" "*" {%0a set "username" "${1}";%0a}%0a%0apipe :copy "sa-learn-spam.sh" [ "${username}" ];%0a@]%0a%0aOn @@/usr/local/lib/dovecot/sieve/sa-learn-ham.sh@@:%0a[@%0a#!/bin/sh%0aexec /usr/local/bin/rspamc -d "${1}" learn_ham%0a@]%0a%0aOn @@/usr/local/lib/dovecot/sieve/sa-learn-spam.sh@@%0a[@%0a#!/bin/sh%0aexec /usr/local/bin/rspamc -d "${1}" learn_ham%0a@]%0a%0aGrant mode 755 for the above shell scripts%0aGrant +w mode for the sieve directory (with -R)%0a%0aChange directory to the sieve directory and run as root:%0a[@%0a$ doas sievec report-ham.sieve%0a$ doas sievec report-spam.sieve%0a@]%0a%0aRestart dovecot with @@rcctl restart dovecot@@.
12 7feb3d77 2022-12-31 jrmu time=1672417467
13 7feb3d77 2022-12-31 jrmu author:1672417467=mkf
14 7feb3d77 2022-12-31 jrmu csum:1672417467=style 2
15 7feb3d77 2022-12-31 jrmu diff:1672417467:1672417398:minor=12a13,14%0a> %0a> %0a19a22%0a> %0a42a46%0a> %0a61a66%0a> %0a72c77,78%0a%3c On @@/usr/local/lib/dovecot/sieve/sa-learn-ham.sh@@:%0a---%0a> On /usr/local/lib/dovecot/sieve/sa-learn-ham.sh%0a> %0a78c84,85%0a%3c On @@/usr/local/lib/dovecot/sieve/sa-learn-spam.sh@@%0a---%0a> On /usr/local/lib/dovecot/sieve/sa-learn-spam.sh%0a> %0a87c94,95%0a%3c Change directory to the sieve directory and run as root:%0a---%0a> Change directory to the sieve directory and run as root:\\%0a> %0a
16 7feb3d77 2022-12-31 jrmu host:1672417467=198.251.81.133
17 7feb3d77 2022-12-31 jrmu author:1672417398=mkf
18 7feb3d77 2022-12-31 jrmu csum:1672417398=style
19 7feb3d77 2022-12-31 jrmu diff:1672417398:1663292685:minor=3,5c3,12%0a%3c Copied from [[https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/|here]]%0a%3c %0a%3c !! Installation%0a---%0a> Copied from [[https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/]]%0a> %0a> !!! Installation%0a> * @@# pkg_add dovecot-pigeonhole@@%0a> %0a> !!! Setup%0a> %0a> * On /etc/dovecot/20-imap.conf%0a> %0a> %0a7c14,16%0a%3c $ doas pkg_add dovecot-pigeonhole%0a---%0a> protocol imap {%0a> mail_plugins = $mail_plugins imap_sieve%0a> }%0a10,14c19,20%0a%3c !! Setup%0a%3c %0a%3c On @@/etc/dovecot/20-imap.conf@@:%0a%3c %0a%3c %0a---%0a> * On /etc/dovecot/90-plugin.conf%0a> %0a16,23d21%0a%3c protocol imap {%0a%3c mail_plugins = $mail_plugins imap_sieve%0a%3c }%0a%3c @]%0a%3c %0a%3c On @@/etc/dovecot/90-plugin.conf@@:%0a%3c %0a%3c [@%0a45,46c43,44%0a%3c On @@/usr/local/lib/dovecot/sieve/report-ham.sieve@@:%0a%3c %0a---%0a> * On /usr/local/lib/dovecot/sieve/report-ham.sieve%0a> %0a65,66c63,64%0a%3c On @@/usr/local/lib/dovecot/sieve/report-spam.sieve@@:%0a%3c %0a---%0a> * On /usr/local/lib/dovecot/sieve/report-spam.sieve%0a> %0a77,78c75,76%0a%3c On /usr/local/lib/dovecot/sieve/sa-learn-ham.sh%0a%3c %0a---%0a> * On /usr/local/lib/dovecot/sieve/sa-learn-ham.sh%0a> %0a84,85c82,83%0a%3c On /usr/local/lib/dovecot/sieve/sa-learn-spam.sh%0a%3c %0a---%0a> * On /usr/local/lib/dovecot/sieve/sa-learn-spam.sh%0a> %0a91,95c89,93%0a%3c Grant mode 755 for the above shell scripts%0a%3c Grant +w mode for the sieve directory (with -R)%0a%3c %0a%3c Change directory to the sieve directory and run as root:\\%0a%3c %0a---%0a> * Grant mode 0755 for the above shell scripts%0a> * Grant +w mode for the sieve directory (with -R)%0a> %0a> * Change directory to the sieve directory and run as root:\\%0a> %0a97,98c95,96%0a%3c $ doas sievec report-ham.sieve%0a%3c $ doas sievec report-spam.sieve%0a---%0a> # sievec report-ham.sieve%0a> # sievec report-spam.sieve%0a101c99,100%0a%3c Restart dovecot with @@rcctl restart dovecot@@.%0a\ No newline at end of file%0a---%0a> * Restart dovecot with @@rcctl restart dovecot@@%0a> %0a
20 7feb3d77 2022-12-31 jrmu host:1672417398=198.251.81.133
21 eab566c6 2022-09-17 jrmu author:1663292685=akoizumi
22 7feb3d77 2022-12-31 jrmu csum:1663292685=sorry if i can't explain things well by myself
23 eab566c6 2022-09-17 jrmu diff:1663292685:1663292685:=1,100d0%0a%3c This is useful in combination with @@rspamd@@%0a%3c %0a%3c Copied from [[https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/]]%0a%3c %0a%3c !!! Installation%0a%3c * @@# pkg_add dovecot-pigeonhole@@%0a%3c %0a%3c !!! Setup%0a%3c %0a%3c * On /etc/dovecot/20-imap.conf%0a%3c %0a%3c %0a%3c [@%0a%3c protocol imap {%0a%3c mail_plugins = $mail_plugins imap_sieve%0a%3c }%0a%3c @]%0a%3c %0a%3c * On /etc/dovecot/90-plugin.conf%0a%3c %0a%3c [@%0a%3c plugin {%0a%3c sieve_plugins = sieve_imapsieve sieve_extprograms%0a%3c sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment%0a%3c %0a%3c imapsieve_mailbox1_name = Junk%0a%3c imapsieve_mailbox1_causes = COPY APPEND%0a%3c imapsieve_mailbox1_before = file:/usr/local/lib/dovecot/sieve/report-spam.sieve%0a%3c %0a%3c imapsieve_mailbox2_name = *%0a%3c imapsieve_mailbox2_from = Junk%0a%3c imapsieve_mailbox2_causes = COPY%0a%3c imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve%0a%3c %0a%3c imapsieve_mailbox3_name = Inbox%0a%3c imapsieve_mailbox3_causes = APPEND%0a%3c imapsieve_mailbox3_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve%0a%3c %0a%3c sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve%0a%3c }%0a%3c @]%0a%3c %0a%3c * On /usr/local/lib/dovecot/sieve/report-ham.sieve%0a%3c %0a%3c [@%0a%3c require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];%0a%3c %0a%3c if environment :matches "imap.mailbox" "*" {%0a%3c set "mailbox" "${1}";%0a%3c }%0a%3c %0a%3c if string "${mailbox}" "Trash" {%0a%3c stop;%0a%3c }%0a%3c %0a%3c if environment :matches "imap.user" "*" {%0a%3c set "username" "${1}";%0a%3c }%0a%3c %0a%3c pipe :copy "sa-learn-ham.sh" [ "${username}" ];%0a%3c @]%0a%3c %0a%3c * On /usr/local/lib/dovecot/sieve/report-spam.sieve%0a%3c %0a%3c [@%0a%3c require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];%0a%3c %0a%3c if environment :matches "imap.user" "*" {%0a%3c set "username" "${1}";%0a%3c }%0a%3c %0a%3c pipe :copy "sa-learn-spam.sh" [ "${username}" ];%0a%3c @]%0a%3c %0a%3c * On /usr/local/lib/dovecot/sieve/sa-learn-ham.sh%0a%3c %0a%3c [@%0a%3c #!/bin/sh%0a%3c exec /usr/local/bin/rspamc -d "${1}" learn_ham%0a%3c @]%0a%3c %0a%3c * On /usr/local/lib/dovecot/sieve/sa-learn-spam.sh%0a%3c %0a%3c [@%0a%3c #!/bin/sh%0a%3c exec /usr/local/bin/rspamc -d "${1}" learn_ham%0a%3c @]%0a%3c %0a%3c * Grant mode 0755 for the above shell scripts%0a%3c * Grant +w mode for the sieve directory (with -R)%0a%3c %0a%3c * Change directory to the sieve directory and run as root:\\%0a%3c %0a%3c [@%0a%3c # sievec report-ham.sieve%0a%3c # sievec report-spam.sieve%0a%3c @]%0a%3c %0a%3c * Restart dovecot with @@rcctl restart dovecot@@%0a%3c %0a
24 eab566c6 2022-09-17 jrmu host:1663292685=138.117.22.105