diff options
Diffstat (limited to 'test/scripts/0000-Basic/0626')
-rw-r--r-- | test/scripts/0000-Basic/0626 | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/test/scripts/0000-Basic/0626 b/test/scripts/0000-Basic/0626 new file mode 100644 index 000000000..6da58ee48 --- /dev/null +++ b/test/scripts/0000-Basic/0626 @@ -0,0 +1,82 @@ +# ACL 'seen' condition +# +exim -DOPT='-1s' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# Check that a hints DB was created. +# Only the key is useful thanks to munging; should match the IP used above. +dump seen +# +sleep 1 +# should now see old-enough record +exim -DOPT='-1s' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# force an update (visible via debug output in stdout for -bh) +exim -DOPT='-1s / write' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# default key should change with ip +exim -DOPT='-1s' -bh HOSTIPV4 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +dump seen +# explicit key (also checking expansion) +exim -DOPT='-1s / key=${sender_host_address}_foo' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +dump seen +# check refresh +sleep 1 +exim -DOPT='-1s / refresh=1s' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# +# +# +# +# +# test for seen-more-recently-than +# that previous one should be no older than 5s, so this should pass +# do not update +# check list-parsing spaceless while we're here +exim -DOPT='5s/key=${sender_host_address}_foo/readonly' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# check the above no-update by waiting longer than the later-than interval; should fail +# should update +sleep 2 +exim -DOPT='1s / key=${sender_host_address}_foo' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** +# having updated, should pass +exim -DOPT='1s / key=${sender_host_address}_foo' -bh 127.0.0.1 +HELO test +MAIL FROM:<tester@test.ex> +RCPT TO:<a1@test.ex> +QUIT +**** |