[exim-cvs] Test case for retry_include_ip_address

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Git Commits Mailing List
Date:  
À: exim-cvs
Sujet: [exim-cvs] Test case for retry_include_ip_address
Gitweb: http://git.exim.org/exim.git/commitdiff/51596af432c9365790451f0859385b53c0205b1d
Commit:     51596af432c9365790451f0859385b53c0205b1d
Parent:     007a2dee4abdc3b763d8844f10112a0bd068a17a
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Nov 15 21:11:23 2014 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Nov 16 13:57:36 2014 +0000


    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 ebd6e89..3f72adb 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 beb27f7..40bfaa4 100644
--- a/test/log/0099
+++ b/test/log/0099
@@ -1,10 +1,17 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? 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@??? 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@??? 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@??? 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@??? 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@??? 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 f9bd430..cc59249 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@??? 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@??? 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@??? 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 c615c1c..2522821 100644
--- a/test/scripts/0000-Basic/0099
+++ b/test/scripts/0000-Basic/0099
@@ -1,5 +1,8 @@
# retry data
-exim -odi userx@???
+#
+#
+# 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@???
****
exim -brt x@???
diff --git a/test/stdout/0099 b/test/stdout/0099
index 729af36..e9272ba 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;