Trusted/untrusted Sieve runtimes
This commit is contained in:
@@ -27,14 +27,14 @@ use utils::config::Config;
|
||||
use crate::smtp::{TestConfig, TestSMTP};
|
||||
|
||||
const CONFIG: &str = r#"
|
||||
[sieve.smtp]
|
||||
[sieve.trusted]
|
||||
from-name = "Sieve Daemon"
|
||||
from-addr = "sieve@foobar.org"
|
||||
return-path = ""
|
||||
hostname = "mx.foobar.org"
|
||||
no-capability-check = true
|
||||
|
||||
[sieve.smtp.limits]
|
||||
[sieve.trusted.limits]
|
||||
redirects = 3
|
||||
out-messages = 5
|
||||
received-headers = 50
|
||||
@@ -127,7 +127,7 @@ values = "file://%CFG_PATH%/maps/scores.map"
|
||||
[resolver]
|
||||
public-suffix = "file://%LIST_PATH%/public-suffix.dat"
|
||||
|
||||
[sieve.smtp.scripts]
|
||||
[sieve.trusted.scripts]
|
||||
"#;
|
||||
|
||||
const CREATE_TABLES: &[&str; 3] = &[
|
||||
|
||||
@@ -46,13 +46,13 @@ rewrite = [ { all-of = [ { if = "rcpt-domain", eq = "foobar.net" },
|
||||
script = [ { if = "rcpt-domain", eq = "foobar.org", then = "rcpt" },
|
||||
{ else = false } ]
|
||||
|
||||
[sieve.smtp]
|
||||
[sieve.trusted]
|
||||
from-name = "Sieve Daemon"
|
||||
from-addr = "sieve@foobar.org"
|
||||
return-path = ""
|
||||
hostname = "mx.foobar.org"
|
||||
|
||||
[sieve.smtp.limits]
|
||||
[sieve.trusted.limits]
|
||||
redirects = 3
|
||||
out-messages = 5
|
||||
received-headers = 50
|
||||
@@ -60,7 +60,7 @@ cpu = 10000
|
||||
nested-includes = 5
|
||||
duplicate-expiry = "7d"
|
||||
|
||||
[sieve.smtp.scripts]
|
||||
[sieve.trusted.scripts]
|
||||
mail = '''
|
||||
require ["variables", "envelope"];
|
||||
|
||||
|
||||
@@ -60,14 +60,14 @@ command = [ { if = "remote-ip", eq = "10.0.0.123", then = "/bin/bash" },
|
||||
arguments = ["%CFG_PATH%/pipe_me.sh", "hello", "world"]
|
||||
timeout = "10s"
|
||||
|
||||
[sieve.smtp]
|
||||
[sieve.trusted]
|
||||
from-name = "Sieve Daemon"
|
||||
from-addr = "sieve@foobar.org"
|
||||
return-path = ""
|
||||
hostname = "mx.foobar.org"
|
||||
sign = ["rsa"]
|
||||
|
||||
[sieve.smtp.limits]
|
||||
[sieve.trusted.limits]
|
||||
redirects = 3
|
||||
out-messages = 5
|
||||
received-headers = 50
|
||||
@@ -75,7 +75,7 @@ cpu = 10000
|
||||
nested-includes = 5
|
||||
duplicate-expiry = "7d"
|
||||
|
||||
[sieve.smtp.scripts]
|
||||
[sieve.trusted.scripts]
|
||||
"#;
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user