summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-06-27 14:34:26 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-06-27 14:34:26 +0000
commit4608d6834bf682e578a5d907a2f6b8fb674c07a0 (patch)
tree40cfbd87cf1cbd8d456b0bcc11de7bec9742c673 /test
parent4e167a8cc7dd4a135f23abee763763add28494fd (diff)
Implement filter_prepend_home option.
Diffstat (limited to 'test')
-rw-r--r--test/aux-fixed/0037.f-73
-rw-r--r--test/confs/003712
-rw-r--r--test/scripts/0000-Basic/00376
-rw-r--r--test/stderr/00378
-rw-r--r--test/stdout/00374
5 files changed, 33 insertions, 0 deletions
diff --git a/test/aux-fixed/0037.f-7 b/test/aux-fixed/0037.f-7
new file mode 100644
index 000000000..01d6c6db7
--- /dev/null
+++ b/test/aux-fixed/0037.f-7
@@ -0,0 +1,3 @@
+#exim filter
+
+save relative
diff --git a/test/confs/0037 b/test/confs/0037
index 522694aab..ad855ec1a 100644
--- a/test/confs/0037
+++ b/test/confs/0037
@@ -1,5 +1,7 @@
# Exim test configuration 0037
+FILTER_PREPEND_HOME=
+
exim_path = EXIM_PATH
host_lookup_order = bydns
rfc1413_query_timeout = 0s
@@ -39,6 +41,16 @@ fail_read_filter:
file = DIR/aux-var/TESTNUM.f-readfile
user = CALLER
+prepend_filter:
+ driver = redirect
+ local_parts = prepend
+ allow_filter
+ router_home_directory = /usr
+ file = DIR/aux-fixed/TESTNUM.f-7
+ file_transport = appendfile
+ user = CALLER
+ FILTER_PREPEND_HOME
+
userfilter:
driver = redirect
allow_filter
diff --git a/test/scripts/0000-Basic/0037 b/test/scripts/0000-Basic/0037
index be3aa94cd..5737c724b 100644
--- a/test/scripts/0000-Basic/0037
+++ b/test/scripts/0000-Basic/0037
@@ -171,4 +171,10 @@ Subject: should give rise to vacation message
exim -odi filter-stat
Subject: should give filter error (7)
****
+# Check prepend $home
+exim -bt prepend@test.ex
+****
+# Check not prepend $home
+exim -DFILTER_PREPEND_HOME=no_filter_prepend_home -bt prepend@test.ex
+****
no_msglog_check
diff --git a/test/stderr/0037 b/test/stderr/0037
index 168878873..208cda9fb 100644
--- a/test/stderr/0037
+++ b/test/stderr/0037
@@ -29,6 +29,10 @@ check_vars router skipped: local_parts mismatch
local_part=filter-userx domain=test.ex
checking local_parts
fail_read_filter router skipped: local_parts mismatch
+--------> prepend_filter router <--------
+local_part=filter-userx domain=test.ex
+checking local_parts
+prepend_filter router skipped: local_parts mismatch
--------> userfilter router <--------
local_part=filter-userx domain=test.ex
checking local_parts
@@ -62,6 +66,10 @@ check_vars router skipped: local_parts mismatch
local_part=userx domain=test.ex
checking local_parts
fail_read_filter router skipped: local_parts mismatch
+--------> prepend_filter router <--------
+local_part=userx domain=test.ex
+checking local_parts
+prepend_filter router skipped: local_parts mismatch
--------> userfilter router <--------
local_part=userx domain=test.ex
checking local_parts
diff --git a/test/stdout/0037 b/test/stdout/0037
index a6643e466..47139ffda 100644
--- a/test/stdout/0037
+++ b/test/stdout/0037
@@ -257,3 +257,7 @@ Headers remove "remove-this"
Unseen deliver message to: userz@test.ex errors_to abcd@test.ex
Filtering did not set up a significant delivery.
Normal delivery will occur.
+prepend@test.ex -> /usr/relative
+ transport = appendfile
+prepend@test.ex -> relative
+ transport = appendfile