diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-07-25 12:06:07 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-07-25 12:06:07 +0100 |
commit | f3ebb786e451da973560f1c9d8cdb151d25108b5 (patch) | |
tree | 8fd69711b9a429b20a1b8b1d18ae63b726cb9723 /test/scripts | |
parent | 21aa05977abff1eaa69bb97ef99080220915f7c0 (diff) |
Track tainted data and refuse to expand it
Diffstat (limited to 'test/scripts')
-rw-r--r-- | test/scripts/0000-Basic/0002 | 3 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0137 | 20 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0428 | 38 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0504 | 9 | ||||
-rw-r--r-- | test/scripts/1000-Basic-ipv6/1003 | 25 | ||||
-rw-r--r-- | test/scripts/5000-maildir/5000 | 41 | ||||
-rw-r--r-- | test/scripts/5100-lmtp-transport/5103 | 1 |
7 files changed, 64 insertions, 73 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 9334e0448..8e654ac95 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -932,8 +932,9 @@ exim -be -DPTBC=print_topbitchars escape: ${escape:B7·F2ò} **** # Checkout expansion debugging -exim -d-all+expand -be +exim -d-all+expand -f sndr@dom -be primary_hostname: $primary_hostname +sender_address: $sender_address match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} match: ${if match{wxyz}{\N^([ab]+)(\w+)$\N}{$2$1}fail} ${if eq {1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}} diff --git a/test/scripts/0000-Basic/0137 b/test/scripts/0000-Basic/0137 index 56941941f..78e04dd4b 100644 --- a/test/scripts/0000-Basic/0137 +++ b/test/scripts/0000-Basic/0137 @@ -1,29 +1,33 @@ # mailbox locking -exim -odi userx +exim -odi -f t1@foo userx Subject: First -Transport: local_delivery + +local_delivery First message. **** exim_lock -v test-mail/userx -exim -odi userx +exim -odi -f t1@foo userx Subject: Second -Transport: local_delivery + +local_delivery Second message **** exim -qf **** exim_lock -v -fcntl test-mail/userx -exim -odi userx +exim -odi -f t2@foo userx Subject: Third -Transport: local_delivery_fcntl + +local_delivery_fcntl Third message **** exim -qf **** exim_lock -v -fcntl test-mail/userx -exim -odi userx +exim -odi -f t3@foo userx Subject: Fourth -Transport: local_delivery_fcntl_blocking + +local_delivery_fcntl_blocking Fourth message **** exim -qf diff --git a/test/scripts/0000-Basic/0428 b/test/scripts/0000-Basic/0428 index d554c80d0..24c1b1265 100644 --- a/test/scripts/0000-Basic/0428 +++ b/test/scripts/0000-Basic/0428 @@ -29,9 +29,10 @@ Filter: if true { stop; fileinto "inbox.never"; } Test 7 **** # This should fileinto inbox.JUNK (99 equal 99): -exim -odi userx +exim -odi userx8 X-Sieve: 99 -Filter: require["fileinto","comparator-i;ascii-numeric"]; + + require["fileinto","comparator-i;ascii-numeric"]; if header :comparator "i;ascii-numeric" "X-Sieve" "99" { fileinto "inbox.JUNK"; stop; @@ -39,9 +40,10 @@ Filter: require["fileinto","comparator-i;ascii-numeric"]; Test 8 **** # This should not fileinto inbox.JUNK (98 not equal 99): -exim -odi userx +exim -odi userx9 X-Sieve: 99 -Filter: require["fileinto","comparator-i;ascii-numeric"]; + + require["fileinto","comparator-i;ascii-numeric"]; if header :comparator "i;ascii-numeric" "X-Sieve" "98" { fileinto "inbox.JUNK"; stop; @@ -49,9 +51,10 @@ Filter: require["fileinto","comparator-i;ascii-numeric"]; Test 9 **** # This should fileinto inbox.JUNK (99-suffix equal 99): -exim -odi userx +exim -odi userx10 X-Sieve: 99- -Filter: require["fileinto","comparator-i;ascii-numeric"]; + + require["fileinto","comparator-i;ascii-numeric"]; if header :comparator "i;ascii-numeric" "X-Sieve" "99" { fileinto "inbox.JUNK"; stop; @@ -59,9 +62,10 @@ Filter: require["fileinto","comparator-i;ascii-numeric"]; Test 10 **** # This should fileinto inbox.JUNK (non-numeric equal non-numeric): -exim -odi userx +exim -odi userx11 X-Sieve: -99 -Filter: require["fileinto","comparator-i;ascii-numeric"]; + + require["fileinto","comparator-i;ascii-numeric"]; if header :comparator "i;ascii-numeric" "X-Sieve" "-99" { fileinto "inbox.JUNK"; stop; @@ -69,9 +73,10 @@ Filter: require["fileinto","comparator-i;ascii-numeric"]; Test 11 **** # This should fileinto inbox.JUNK (non-numeric equal non-numeric): -exim -odi userx +exim -odi userx12 X-Sieve: -99 -Filter: require["fileinto","comparator-i;ascii-numeric"]; + + require["fileinto","comparator-i;ascii-numeric"]; if header :comparator "i;ascii-numeric" "X-Sieve" "-98" { fileinto "inbox.JUNK"; stop; @@ -79,16 +84,17 @@ Filter: require["fileinto","comparator-i;ascii-numeric"]; Test 12 **** # This is a simple test of "vacation" -exim -odi -f someone@test.ex userx -To: userx@test.ex -Filter: require ["vacation"]; +exim -odi -f someone@test.ex userx13 +To: userx13@test.ex + + require ["vacation"]; vacation "I am gone. Not here."; Test 13 **** # Test use of suffix -exim -odi -f someone@test.ex userx-suffix userx-suffix2 -To: userx-suffix@test.ex -Filter: require ["envelope","fileinto"]; +exim -odi -f someone@test.ex userx14-suffix userx14-suffix2 + + require ["envelope","fileinto"]; if envelope :matches :localpart "to" "*-suffix" { fileinto "userx-sawsuffix"; stop; diff --git a/test/scripts/0000-Basic/0504 b/test/scripts/0000-Basic/0504 index a48e8b4fe..04f19593e 100644 --- a/test/scripts/0000-Basic/0504 +++ b/test/scripts/0000-Basic/0504 @@ -1,12 +1,10 @@ # transport filter command fails to execute need_ipv4 # -exim -odi userx -transport: t1 +exim -DOPT=t1 -odi userx Test 1 **** -exim -odi userx -transport: t2 +exim -DOPT=t2 -odi userx Test 2 **** server PORT_S @@ -21,8 +19,7 @@ RCPT TO DATA 354 Send it **** -exim -odi userx -transport: t3 +exim -DOPT=t3 -odi userx Test 3 **** no_msglog_check diff --git a/test/scripts/1000-Basic-ipv6/1003 b/test/scripts/1000-Basic-ipv6/1003 index 646b1b4a3..1be6923b0 100644 --- a/test/scripts/1000-Basic-ipv6/1003 +++ b/test/scripts/1000-Basic-ipv6/1003 @@ -4,24 +4,29 @@ need_ipv6 # exim -DSERVER=server -bd -oX PORT_D **** -exim userx@test.ex -hosts: 127.0.0.1 +exim user4@h1.test.ex + +1 interface: <; ::1 ; HOSTIPV4 **** -exim userx@test.ex -hosts: <; ::1 +exim user6@h2.test.ex + +2 interface: <; HOSTIPV6 ; HOSTIPV4 **** -exim userx@test.ex -hosts: <; ::1 +exim user6@h3.test.ex + +3 interface: <; ${if eq{0}{1}{HOSTIPV6}fail} **** -exim userx@test.ex -hosts: <; ::1 +exim user6@h4.test.ex + +4 interface: <; ${if eq{0}{1}{HOSTIPV6}{ }} **** -exim userx@test.ex -hosts: <; ::1 +exim user6@h5.test.ex + +5 interface: <; ${if **** exim -qf diff --git a/test/scripts/5000-maildir/5000 b/test/scripts/5000-maildir/5000 index 5b763fcd3..a1d1ce358 100644 --- a/test/scripts/5000-maildir/5000 +++ b/test/scripts/5000-maildir/5000 @@ -1,58 +1,37 @@ # exim quota + warn threshold with maildir -exim -odi userx -maildir:maildir_ +exim -DVALUE=maildir_appendfile -odi userx This is a test message **** write test-data 100x60 -maildir:maildir_ ++++ **** -exim -odi userx <test-data +exim -DVALUE=maildir_appendfile -odi userx <test-data **** -exim -odi userx <test-data +exim -DVALUE=maildir_appendfile -odi userx <test-data **** -exim -odi userx -maildir:maildir_tagged_ -tag:S370 +exim -DVALUE=maildir_tagged_appendfile -DOPT=S370 -odi userx This is a test message **** sleep 1 -exim -odi userx -maildir:maildir_tagged_ -tag:,S=370 +exim -DVALUE=maildir_tagged_appendfile -DOPT=,S=370 -odi userx This is a test message **** sleep 1 -exim -odi userx -maildir:maildir_tagged_ -tag:${if eq{0}{1}{rhubarb}fail} +exim -DVALUE=maildir_tagged_appendfile -DOPT='${if eq{0}{1}{rhubarb}fail}' -odi userx This is a test message **** sleep 1 # deliberate syntax fail -exim -odi userx -maildir:maildir_tagged_ -tag:${if eq{0}{1}{rhubarb} +exim -DVALUE=maildir_tagged_appendfile -DOPT='${if eq{0}{1}{rhubarb}' -odi userx This is a test message **** sleep 1 # overlongname -exim -odi userx -maildir:maildir_tagged_ -tag:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +exim -DVALUE=maildir_tagged_appendfile -DOPT=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -odi userx This is a test message **** sleep 1 -exim -odi userx -maildir:maildir_taggedX_ -tag:,S=10694953:2,S +exim -DVALUE=maildir_taggedX_appendfile -DOPT=,S=10694953:2,S -odi userx **** -exim -d-all+transport -odi userx -maildir:maildir_taggedX_ -tag:,S=412:2,S +exim -d-all+transport -DVALUE=maildir_taggedX_appendfile -DOPT=,S=412:2,S -odi userx **** diff --git a/test/scripts/5100-lmtp-transport/5103 b/test/scripts/5100-lmtp-transport/5103 index 3d7ace50f..ce894401b 100644 --- a/test/scripts/5100-lmtp-transport/5103 +++ b/test/scripts/5100-lmtp-transport/5103 @@ -2,7 +2,6 @@ need_ipv4 # exim -odi userx -transport: t1 Test 1 **** no_msglog_check |