smtp-server/resources/tests/config/rules.toml

30 lines
612 B
TOML
Raw Normal View History

2022-12-13 18:19:41 +00:00
[rule]
2022-12-16 17:20:35 +00:00
"my-nested-rule" = { any-of = [
2022-12-23 18:03:27 +00:00
{if = "rcpt-domain", eq = "example.org"},
{if = "remote-ip", eq = "192.168.0.0/24"},
2022-12-16 17:20:35 +00:00
{all-of = [
2022-12-23 18:03:27 +00:00
{if = "rcpt", starts-with = "no-reply@"},
{if = "sender", ends-with = "@domain.org"},
2022-12-16 17:20:35 +00:00
{none-of = [
2022-12-23 18:03:27 +00:00
{if = "priority", eq = 1},
{if = "priority", ne = -2},
2022-12-13 18:19:41 +00:00
]}
]}
]}
[rule."simple"]
2022-12-23 18:03:27 +00:00
if = "listener"
2022-12-16 17:20:35 +00:00
eq = "smtp"
2022-12-13 18:19:41 +00:00
[rule."is-authenticated"]
2022-12-23 18:03:27 +00:00
if = "authenticated-as"
2022-12-16 17:20:35 +00:00
ne = ""
2022-12-13 18:19:41 +00:00
2022-12-16 17:20:35 +00:00
[[rule."expanded".all-of]]
2022-12-23 18:03:27 +00:00
if = "sender-domain"
2022-12-16 17:20:35 +00:00
starts-with = "example"
2022-12-13 18:19:41 +00:00
2022-12-16 17:20:35 +00:00
[[rule."expanded".all-of]]
2022-12-27 18:11:50 +00:00
if = "sender"
2022-12-16 17:20:35 +00:00
in-list = "test-list"