diff options
Diffstat (limited to 'test/confs')
-rw-r--r-- | test/confs/0102 | 4 | ||||
-rw-r--r-- | test/confs/0137 | 6 | ||||
-rw-r--r-- | test/confs/0140 | 2 | ||||
-rw-r--r-- | test/confs/0284 | 4 | ||||
-rw-r--r-- | test/confs/0386 | 13 | ||||
-rw-r--r-- | test/confs/0428 | 100 | ||||
-rw-r--r-- | test/confs/0478 | 4 | ||||
-rw-r--r-- | test/confs/0504 | 2 | ||||
-rw-r--r-- | test/confs/0610 | 10 | ||||
-rw-r--r-- | test/confs/1003 | 43 | ||||
-rw-r--r-- | test/confs/5000 | 8 | ||||
-rw-r--r-- | test/confs/5050 | 4 | ||||
-rw-r--r-- | test/confs/5103 | 2 |
13 files changed, 184 insertions, 18 deletions
diff --git a/test/confs/0102 b/test/confs/0102 index dde11a5e9..2497fd032 100644 --- a/test/confs/0102 +++ b/test/confs/0102 @@ -25,7 +25,9 @@ localuser: local_part_prefix = bsmtp_ : mmdf_ local_part_prefix_optional retry_use_local_part - transport = ${local_part_prefix}local_delivery + transport = ${if !def:local_part_prefix {} \ + {${if eq {bsmtp_}{$local_part_prefix} {bsmtp_}\ + {${if eq {mmdf_}{$local_part_prefix} {mmdf_} {}}}}}}local_delivery # ----- Transports ----- diff --git a/test/confs/0137 b/test/confs/0137 index 1a2094ef3..7c48d6234 100644 --- a/test/confs/0137 +++ b/test/confs/0137 @@ -8,6 +8,7 @@ log_selector = +subject domainlist local_domains = test.ex qualify_domain = test.ex +untrusted_set_sender = * # ----- Routers ----- @@ -17,7 +18,10 @@ begin routers smart: driver = accept retry_use_local_part - transport = $h_transport: + transport = ${if eq {t1}{$sender_address_local_part} {local_delivery} \ + {${if eq {t2}{$sender_address_local_part} {local_delivery_fcntl} \ + {${if eq {t3}{$sender_address_local_part} {local_delivery_fcntl_blocking} \ + {} }}}}} # ----- Transports ----- diff --git a/test/confs/0140 b/test/confs/0140 index fbc64b43b..02567153c 100644 --- a/test/confs/0140 +++ b/test/confs/0140 @@ -22,7 +22,7 @@ reply: driver = accept retry_use_local_part senders = ! - transport = $local_part + transport = ${if eq {reply1}{$local_part} {reply1}{reply2}} # ----- Transports ----- diff --git a/test/confs/0284 b/test/confs/0284 index d38f38390..0103742f4 100644 --- a/test/confs/0284 +++ b/test/confs/0284 @@ -16,7 +16,9 @@ begin routers all: driver = accept address_data = ${if match{$local_part}{^(.)}{$1}} - transport = ${if match{$local_part}{^.*-(.*)\$}{$1}fail} + transport = ${if eq {${substr_-1_1:$local_part}}{1} {t1} \ + {${if eq {${substr_-1_1:$local_part}}{2} {t2} \ + {${if eq {${substr_-1_1:$local_part}}{3} {t3} {t4}}}}}} # ----- Transports ----- diff --git a/test/confs/0386 b/test/confs/0386 index 5eecfcc98..0af3202a3 100644 --- a/test/confs/0386 +++ b/test/confs/0386 @@ -6,11 +6,22 @@ primary_hostname = myhost.test.ex # ----- Main settings ----- -acl_smtp_rcpt = DIR/aux-fixed/TESTNUM.acl$local_part +acl_smtp_rcpt = chk_rcpt qualify_domain = test.ex trusted_users = CALLER +# ----- ACL ----- +begin acl + +chk_rcpt: + accept local_parts = 1 + endpass + acl = DIR/aux-fixed/TESTNUM.acl1 + accept local_parts = 2 + endpass + acl = DIR/aux-fixed/TESTNUM.acl2 + # ----- Routers ----- begin routers diff --git a/test/confs/0428 b/test/confs/0428 index 38601f30b..5ee5cdbb8 100644 --- a/test/confs/0428 +++ b/test/confs/0428 @@ -36,16 +36,112 @@ r1: user = CALLER file_transport = t1 -r2: +r2_8: + driver = redirect + local_parts = userx8 + allow_filter + data = #Sieve filter\n \ + require["fileinto","comparator-i;ascii-numeric"]; \ + if header :comparator "i;ascii-numeric" "X-Sieve" "99" { \ + fileinto "inbox.JUNK"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2_9: + driver = redirect + local_parts = userx9 + allow_filter + data = #Sieve filter\n \ + require["fileinto","comparator-i;ascii-numeric"]; \ + if header :comparator "i;ascii-numeric" "X-Sieve" "98" { \ + fileinto "inbox.JUNK"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2_10: + driver = redirect + local_parts = userx10 + allow_filter + data = #Sieve filter\n \ + require["fileinto","comparator-i;ascii-numeric"]; \ + if header :comparator "i;ascii-numeric" "X-Sieve" "99" { \ + fileinto "inbox.JUNK"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2_11: driver = redirect + local_parts = userx11 + allow_filter + data = #Sieve filter\n \ + require["fileinto","comparator-i;ascii-numeric"]; \ + if header :comparator "i;ascii-numeric" "X-Sieve" "-99" { \ + fileinto "inbox.JUNK"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2_12: + driver = redirect + local_parts = userx12 + allow_filter + data = #Sieve filter\n \ + require["fileinto","comparator-i;ascii-numeric"]; \ + if header :comparator "i;ascii-numeric" "X-Sieve" "-98" { \ + fileinto "inbox.JUNK"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2_13: + driver = redirect + local_parts = userx13 : someone13 + allow_filter + data = #Sieve filter\n \ + require ["vacation"]; \ + vacation "I am gone. Not here."; + user = CALLER + file_transport = t1 + reply_transport = t3 + sieve_vacation_directory = DIR/test-vacation-directory + +r2_14: + driver = redirect + local_parts = userx14 local_part_suffix = -* local_part_suffix_optional allow_filter + data = #Sieve filter\n \ + require ["envelope","fileinto"]; \ + if envelope :matches :localpart "to" "*-suffix" { \ + fileinto "userx-sawsuffix"; \ + stop; \ + } + user = CALLER + file_transport = t1 + reply_transport = t3 + +r2: + driver = redirect + allow_filter + skip_syntax_errors data = "#Sieve filter\n$h_filter:" user = CALLER file_transport = t1 reply_transport = t3 - sieve_vacation_directory = DIR/test-vacation-directory # ----- Transports ----- diff --git a/test/confs/0478 b/test/confs/0478 index d9fd0a5ce..cfb9a17b1 100644 --- a/test/confs/0478 +++ b/test/confs/0478 @@ -27,7 +27,9 @@ begin transports t1: driver = smtp port = PORT_D - hosts = ${if eq {$sender_host_address}{}{$local_part}{V4NET.0.0.2}} + hosts = ${if !eq {$sender_host_address}{} {V4NET.0.0.2} \ + {${if eq {127.0.0.1}{$local_part} {127.0.0.1} \ + {${if eq {V4NET.0.0.1}{$local_part} {V4NET.0.0.1}}}}}} allow_localhost connect_timeout = 1s diff --git a/test/confs/0504 b/test/confs/0504 index b2dadfcb3..c7b0131c0 100644 --- a/test/confs/0504 +++ b/test/confs/0504 @@ -13,7 +13,7 @@ begin routers r1: driver = accept - transport = $h_transport: + transport = OPT # ----- Transports ----- diff --git a/test/confs/0610 b/test/confs/0610 index 0567d8aaf..49778352f 100644 --- a/test/confs/0610 +++ b/test/confs/0610 @@ -28,9 +28,15 @@ conn_chk: begin routers -client: +r1: driver = accept - transport = $sender_address_local_part + condition = ${if eq {t1}{$sender_address_local_part}} + transport = t1 + +r2: + driver = accept + condition = ${if eq {t2}{$sender_address_local_part}} + transport = t2 # ----- Transports ----- diff --git a/test/confs/1003 b/test/confs/1003 index bdbd2e6c3..d15a892fb 100644 --- a/test/confs/1003 +++ b/test/confs/1003 @@ -21,7 +21,11 @@ begin routers client: driver = accept condition = ${if eq {SERVER}{server}{no}{yes}} - transport = send_to_server + address_data = ${substr_1_1:$domain} + transport = send_to_server${if eq {1}{$address_data} {1} \ + {${if eq {2}{$address_data} {2} \ + {${if eq {3}{$address_data} {3} \ + {${if eq {4}{$address_data} {4}{5}}}}}}}} server: driver = accept @@ -37,10 +41,45 @@ local_delivery: file = DIR/test-mail/$local_part user = CALLER +send_to_server1: + driver = smtp + allow_localhost + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} + port = PORT_D + interface = <; ::1 ; HOSTIPV4 + +send_to_server2: + driver = smtp + allow_localhost + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} + port = PORT_D + interface = <; HOSTIPV6 ; HOSTIPV4 + +send_to_server3: + driver = smtp + allow_localhost + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} + port = PORT_D + interface = <; ${if eq{0}{1}{HOSTIPV6}fail} + +send_to_server4: + driver = smtp + allow_localhost + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} + port = PORT_D + interface = <; ${if eq{0}{1}{HOSTIPV6}{ }} + +send_to_server5: + driver = smtp + allow_localhost + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} + port = PORT_D + interface = <; ${if + send_to_server: driver = smtp allow_localhost - hosts = $h_hosts + hosts = ${if eq {$local_part}{user4} {127.0.0.1} {<; ::1}} port = PORT_D interface = ${expand:$h_interface:} diff --git a/test/confs/5000 b/test/confs/5000 index e3328c6a1..de9b4f8e8 100644 --- a/test/confs/5000 +++ b/test/confs/5000 @@ -2,6 +2,8 @@ .include DIR/aux-var/std_conf_prefix +OPT = + primary_hostname = myhost.test.ex # ----- Main settings ----- @@ -14,7 +16,7 @@ begin routers localuser: driver = accept local_parts = userx - transport = $h_maildir:appendfile + transport = VALUE # ----- Transports ----- @@ -33,7 +35,7 @@ maildir_tagged_appendfile: directory = DIR/test-mail envelope_to_add maildir_format - maildir_tag = ${expand:$h_tag:} + maildir_tag = OPT message_prefix = quota = 20K quota_size_regex = S=(\d+)$ @@ -45,7 +47,7 @@ maildir_taggedX_appendfile: directory = DIR/test-mail envelope_to_add maildir_format - maildir_tag = ${expand:$h_tag:} + maildir_tag = OPT message_prefix = quota = 20K quota_size_regex = ,S=(\d+): diff --git a/test/confs/5050 b/test/confs/5050 index 462d7dcf2..4258a727f 100644 --- a/test/confs/5050 +++ b/test/confs/5050 @@ -19,7 +19,9 @@ localuser: local_part_prefix = bsmtp_ : mmdf_ : mbx_ local_part_prefix_optional retry_use_local_part - transport = ${local_part_prefix}local_delivery + transport = ${if eq {bsmtp_} {${local_part_prefix}} {bsmtp_} \ + {${if eq {mmdf_} {${local_part_prefix}} {mmdf_} \ + {${if eq {mbx_} {${local_part_prefix}} {mbx_}{}}}}}}local_delivery # ----- Transports ----- diff --git a/test/confs/5103 b/test/confs/5103 index 7212fb30e..e9ac80c6a 100644 --- a/test/confs/5103 +++ b/test/confs/5103 @@ -13,7 +13,7 @@ begin routers r1: driver = accept - transport = $h_transport: + transport = t1 # ----- Transports ----- |