Trusted/untrusted Sieve runtimes

This commit is contained in:
mdecimus
2023-10-23 18:58:04 +02:00
parent 73ccf7be65
commit b5fe327e83
11 changed files with 111 additions and 99 deletions

View File

@@ -1,8 +1,45 @@
#############################################
# SMTP Sieve interpreter configuration
# Sieve untrusted runtime configuration
#############################################
[sieve.smtp]
[sieve.untrusted]
disable-capabilities = []
notification-uris = ["mailto"]
protected-headers = ["Original-Subject", "Original-From", "Received", "Auto-Submitted"]
[sieve.untrusted.limits]
name-length = 512
max-scripts = 256
script-size = 102400
string-length = 4096
variable-name-length = 32
variable-size = 4096
nested-blocks = 15
nested-tests = 15
nested-foreverypart = 3
match-variables = 30
local-variables = 128
header-size = 1024
includes = 3
nested-includes = 3
cpu = 5000
redirects = 1
received-headers = 10
outgoing-messages = 3
[sieve.untrusted.vacation]
default-subject = "Automated reply"
subject-prefix = "Auto: "
[sieve.untrusted.default-expiry]
vacation = "30d"
duplicate = "7d"
#############################################
# Sieve trusted runtime configuration
#############################################
[sieve.trusted]
from-name = "Automated Message"
from-addr = "no-reply@%{DEFAULT_DOMAIN}%"
return-path = ""
@@ -10,7 +47,7 @@ return-path = ""
no-capability-check = true
sign = ["rsa"]
[sieve.smtp.limits]
[sieve.trusted.limits]
redirects = 3
out-messages = 5
received-headers = 50
@@ -18,7 +55,7 @@ cpu = 1048576
nested-includes = 5
duplicate-expiry = "7d"
[sieve.smtp.scripts]
[sieve.trusted.scripts]
#connect = '''require ["variables", "extlists", "reject"];
# if string :list "${env.remote_ip}" "default/blocked-ips" {
# reject "Your IP '${env.remote_ip}' is not welcomed here.";

View File

@@ -11,6 +11,7 @@ base_path = "__BASE_PATH__"
files = [ "%{BASE_PATH}%/etc/common/server.toml",
"%{BASE_PATH}%/etc/common/tls.toml",
"%{BASE_PATH}%/etc/common/tracing.toml",
"%{BASE_PATH}%/etc/common/sieve.toml",
"%{BASE_PATH}%/etc/directory/sql.toml",
"%{BASE_PATH}%/etc/imap/listener.toml",
"%{BASE_PATH}%/etc/imap/settings.toml",
@@ -20,7 +21,6 @@ files = [ "%{BASE_PATH}%/etc/common/server.toml",
"%{BASE_PATH}%/etc/jmap/protocol.toml",
"%{BASE_PATH}%/etc/jmap/push.toml",
"%{BASE_PATH}%/etc/jmap/ratelimit.toml",
"%{BASE_PATH}%/etc/jmap/sieve.toml",
"%{BASE_PATH}%/etc/jmap/store.toml",
"%{BASE_PATH}%/etc/jmap/websockets.toml",
"%{BASE_PATH}%/etc/smtp/auth.toml",
@@ -31,6 +31,5 @@ files = [ "%{BASE_PATH}%/etc/common/server.toml",
"%{BASE_PATH}%/etc/smtp/report.toml",
"%{BASE_PATH}%/etc/smtp/resolver.toml",
"%{BASE_PATH}%/etc/smtp/session.toml",
"%{BASE_PATH}%/etc/smtp/sieve.toml",
"%{BASE_PATH}%/etc/smtp/signature.toml",
"%{BASE_PATH}%/etc/smtp/spamfilter.toml" ]

View File

@@ -1,36 +0,0 @@
#############################################
# JMAP Sieve interpreter configuration
#############################################
[sieve.jmap]
disable-capabilities = []
notification-uris = ["mailto"]
protected-headers = ["Original-Subject", "Original-From", "Received", "Auto-Submitted"]
[sieve.jmap.limits]
name-length = 512
max-scripts = 256
script-size = 102400
string-length = 4096
variable-name-length = 32
variable-size = 4096
nested-blocks = 15
nested-tests = 15
nested-foreverypart = 3
match-variables = 30
local-variables = 128
header-size = 1024
includes = 3
nested-includes = 3
cpu = 5000
redirects = 1
received-headers = 10
outgoing-messages = 3
[sieve.jmap.vacation]
default-subject = "Automated reply"
subject-prefix = "Auto: "
[sieve.jmap.default-expiry]
vacation = "30d"
duplicate = "7d"

View File

@@ -82,7 +82,7 @@ values = "file://%{BASE_PATH}%/etc/spamfilter/maps/spam_trap.list"
type = "map"
values = "file://%{BASE_PATH}%/etc/spamfilter/maps/scores.map"
[sieve.smtp.scripts]
[sieve.trusted.scripts]
spam-filter = ["file://%{BASE_PATH}%/etc/spamfilter/scripts/config.sieve",
"file://%{BASE_PATH}%/etc/spamfilter/scripts/prelude.sieve",
"file://%{BASE_PATH}%/etc/spamfilter/scripts/from.sieve",