Support for referencing context variables from dynamic values.
This commit is contained in:
@@ -24,7 +24,7 @@ test = [
|
||||
{if = "rcpt-domain", starts-with = "foo", then = "${0}${{0}}"},
|
||||
{else = false}
|
||||
]
|
||||
expect = "foo.example.org${{0}}"
|
||||
expect = "foo.example.org${0}"
|
||||
|
||||
[eval."regex"]
|
||||
test = [
|
||||
@@ -40,6 +40,13 @@ test = [
|
||||
]
|
||||
expect = "user@foo.example.org"
|
||||
|
||||
[eval."envelope-match"]
|
||||
test = [
|
||||
{if = "authenticated-as", matches = "^([^.]+)@(.+)$", then = "rcpt ${rcpt} listener ${listener} ip ${local-ip} priority ${priority}"},
|
||||
{else = false}
|
||||
]
|
||||
expect = "rcpt user@foo.example.org listener 123 ip 192.168.9.3 priority -4"
|
||||
|
||||
[eval."static-match"]
|
||||
test = [
|
||||
{if = "authenticated-as", matches = "^([^.]+)@(.+)$", then = "hello world"},
|
||||
@@ -64,6 +71,11 @@ type = "memory"
|
||||
[directory."list_foo".lookup]
|
||||
domains = ["foo"]
|
||||
|
||||
[directory."list_123"]
|
||||
type = "memory"
|
||||
[directory."list_123".lookup]
|
||||
domains = ["123"]
|
||||
|
||||
[maybe-eval."dyn_mx"]
|
||||
test = [
|
||||
{if = "mx", matches = "([^.]+)\.(.+)$", then = "list_${1}"},
|
||||
@@ -86,3 +98,7 @@ expect = "mx"
|
||||
test = "list_foo"
|
||||
expect = "foo"
|
||||
|
||||
[maybe-eval."dyn_123"]
|
||||
test = "list_${listener}"
|
||||
expect = "123"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user