Last active
January 26, 2026 21:36
-
-
Save dmckeone/f88619ef61677267057fa5bcc6caf5cb to your computer and use it in GitHub Desktop.
Dovecot 2.4 sieve for sending rspamd Spam education to a relay/gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"]; | |
| # See dovecot.conf for matching configuration: https://gist.github.com/dmckeone/7cdf170624d77c4ddcdce1721c6f760e | |
| # This configuration is intended to be used with Jinja2, so all variables look like: {{ variable }} | |
| # NOTE: When moving from Trash to Junk assume that the user is intentionally flagging an email as Junk | |
| if environment :matches "imap.user" "*" { | |
| set "username" "${1}"; | |
| } | |
| pipe :copy "rspamc" ["-h", "{{ mail_relay }}", "-P", "{{ rspamd_password }}", "-d", "${username}", "learn_spam"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment