From 51596af432c9365790451f0859385b53c0205b1d Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 15 Nov 2014 21:11:23 +0000 Subject: [PATCH] Test case for retry_include_ip_address --- test/confs/0099 | 7 ++++++- test/log/0099 | 17 ++++++++++++----- test/msglog/0099.10HmaX-0005vi-00 | 8 ++++---- test/scripts/0000-Basic/0099 | 18 +++++++++++++++++- test/stdout/0099 | 25 +++++++++++++++++++------ 5 files changed, 58 insertions(+), 17 deletions(-) diff --git a/test/confs/0099 b/test/confs/0099 index ebd6e8915..3f72adb69 100644 --- a/test/confs/0099 +++ b/test/confs/0099 @@ -1,5 +1,7 @@ # Exim test configuration 0099 +RETRY = + exim_path = EXIM_PATH host_lookup_order = bydns rfc1413_query_timeout = 0s @@ -21,7 +23,9 @@ begin routers all: driver = manualroute - route_list = "* 127.0.0.1 byname" + route_list = simple thishost.test.ex byname \ + ; complex localhost.test.ex byname \ + ; * 127.0.0.1 byname self = send transport = smtp @@ -33,6 +37,7 @@ begin transports smtp: driver = smtp port = 999 + RETRY # ----- Retry ----- diff --git a/test/log/0099 b/test/log/0099 index beb27f7ee..40bfaa402 100644 --- a/test/log/0099 +++ b/test/log/0099 @@ -1,10 +1,17 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaX-0005vi-00 H=127.0.0.1 [127.0.0.1] Connection refused -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@far.away.ex R=all T=smtp defer (dd): Connection refused +1999-03-02 09:44:33 10HmaX-0005vi-00 H=thishost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@simple R=all T=smtp defer (dd): Connection refused 1999-03-02 09:44:33 Start queue run: pid=pppp -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@far.away.ex R=all T=smtp defer (-53): retry time not reached for any host +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@simple R=all T=smtp defer (-53): retry time not reached for any host 1999-03-02 09:44:33 End queue run: pid=pppp 1999-03-02 09:44:33 Start queue run: pid=pppp -1999-03-02 09:44:33 10HmaX-0005vi-00 H=127.0.0.1 [127.0.0.1] Connection refused -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@far.away.ex R=all T=smtp defer (dd): Connection refused +1999-03-02 09:44:33 10HmaX-0005vi-00 H=thishost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@simple R=all T=smtp defer (dd): Connection refused 1999-03-02 09:44:33 End queue run: pid=pppp +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 H=localhost.test.ex [::1] Connection refused +1999-03-02 09:44:33 10HmaY-0005vi-00 H=localhost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 10HmaY-0005vi-00 == usery@complex R=all T=smtp defer (dd): Connection refused +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 H=thishost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 10HmaZ-0005vi-00 == userz@simple R=all T=smtp defer (dd): Connection refused diff --git a/test/msglog/0099.10HmaX-0005vi-00 b/test/msglog/0099.10HmaX-0005vi-00 index f9bd430c0..cc592492f 100644 --- a/test/msglog/0099.10HmaX-0005vi-00 +++ b/test/msglog/0099.10HmaX-0005vi-00 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 Received from CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 H=127.0.0.1 [127.0.0.1] Connection refused -1999-03-02 09:44:33 userx@far.away.ex R=all T=smtp defer (dd): Connection refused -1999-03-02 09:44:33 H=127.0.0.1 [127.0.0.1] Connection refused -1999-03-02 09:44:33 userx@far.away.ex R=all T=smtp defer (dd): Connection refused +1999-03-02 09:44:33 H=thishost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 userx@simple R=all T=smtp defer (dd): Connection refused +1999-03-02 09:44:33 H=thishost.test.ex [127.0.0.1] Connection refused +1999-03-02 09:44:33 userx@simple R=all T=smtp defer (dd): Connection refused diff --git a/test/scripts/0000-Basic/0099 b/test/scripts/0000-Basic/0099 index c615c1ca8..252282112 100644 --- a/test/scripts/0000-Basic/0099 +++ b/test/scripts/0000-Basic/0099 @@ -1,5 +1,8 @@ # retry data -exim -odi userx@far.away.ex +# +# +# This should add an entry for "thishost.test.ex" +exim -odi userx@simple Test message **** dump retry @@ -10,7 +13,20 @@ dump retry sleep 3 exim -odi -q **** +# +# This should add two entries for "localhost.test.ex" (ipv4, ipv6) +exim -odi usery@complex +Test message 2 +**** +dump retry +# +# and one for thishost without its IP +exim -odi -DRETRY=retry_include_ip_address=no userz@simple +Test message +**** dump retry +# +# exim -brt x@dark.star.ex **** exim -brt x@a.b.c diff --git a/test/stdout/0099 b/test/stdout/0099 index 729af365d..e9272baa6 100644 --- a/test/stdout/0099 +++ b/test/stdout/0099 @@ -1,12 +1,25 @@ +++++++++++++++++++++++++++ - T:127.0.0.1:127.0.0.1:999 dd 65 Connection refused -first failed = time last try = time2 next try = time2 + 60 + T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 +++++++++++++++++++++++++++ - T:127.0.0.1:127.0.0.1:999 dd 65 Connection refused -first failed = time last try = time2 next try = time2 + 60 + T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 +++++++++++++++++++++++++++ - T:127.0.0.1:127.0.0.1:999 dd 65 Connection refused -first failed = time last try = time2 next try = time2 + 60 + T:localhost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 + T:localhost.test.ex:::1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 + T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 ++++++++++++++++++++++++++++ + T:localhost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 + T:localhost.test.ex:::1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 + T:thishost.test.ex:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 + T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused +first failed = time last try = time2 next try = time2 + 900 Retry rule: *.star.ex * F,3d,10m; Retry rule: lsearch*@;TESTSUITE/aux-fixed/0099.rlist * F,1d,3m; Retry rule: !*.not.ex * F,2d,15m; -- 2.30.2