From: Jeremy Harris Date: Tue, 2 Jul 2013 18:40:33 +0000 (+0100) Subject: Add test for deferral case X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/a39c510082924c88c23ad58d3a29d5f84664aa9c?ds=inline;hp=-c Add test for deferral case --- a39c510082924c88c23ad58d3a29d5f84664aa9c diff --git a/src/src/readconf.c b/src/src/readconf.c index d59d2edeb..29ad4e7e0 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -3989,6 +3989,7 @@ uschar *p; /* Not receiving messages, don't need to parse the ACL data */ +/*XXX need to make this more selective */ #ifndef EXPERIMENTAL_DBL if (skip) { diff --git a/test/confs/5700 b/test/confs/5700 index 935d0adb2..a30098b52 100644 --- a/test/confs/5700 +++ b/test/confs/5700 @@ -13,26 +13,26 @@ gecos_name = CALLER_NAME acl_smtp_rcpt = accept acl_smtp_data = accept -dbl_delivery_query = ${acl {a_logger}} +dbl_delivery_query = ${acl {logger}{delivery}} # ----- ACL ----- begin acl -a_logger: - require logwrite = \ - A \ - 1 <$dbl_delivery_ip> \ - 2 <$dbl_delivery_port> \ - 3 <$dbl_delivery_fqdn> \ - 4 <$dbl_delivery_local_part> \ - 5 <$dbl_delivery_domain> \ - 6 <$dbl_delivery_confirmation> \ - 7 <$dbl_defer_errno> \ - 8 <$dbl_defer_errstr> \ - 9 <$router_name> \ - 10 <$transport_name> +logger: + accept logwrite = \ + $acl_arg1 \ + delivery_ip <$dbl_delivery_ip> \ + deliver_port <$dbl_delivery_port> \ + delivery_fqdn <$dbl_delivery_fqdn> \ + local_part <$dbl_delivery_local_part> \ + domain <$dbl_delivery_domain> \ + confirmation <$dbl_delivery_confirmation> \ + errno <$dbl_defer_errno> \ + errstr <$dbl_defer_errstr> \ + router <$router_name> \ + transport <$transport_name> # ----- Routers ----- @@ -41,7 +41,7 @@ begin routers others: driver = manualroute - route_list = domain1 127.0.0.1 byname + route_list = * 127.0.0.1 byname self = send transport = smtp no_more @@ -54,5 +54,8 @@ begin transports smtp: driver = smtp port = PORT_S + command_timeout = 1s + final_timeout = 1s + dbl_host_defer_query = ${acl {logger}{deferral}} # End diff --git a/test/log/5700 b/test/log/5700 index 933f2f64c..ee6603733 100644 --- a/test/log/5700 +++ b/test/log/5700 @@ -1,6 +1,19 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss 1999-03-02 09:44:33 Start queue run: pid=pppp -qqf 1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" -1999-03-02 09:44:33 10HmaX-0005vi-00 A 1 127.0.0.1 2 1224 3 127.0.0.1 4 userx 5 domain1 6 250 OK 7 0 8 9 10 +1999-03-02 09:44:33 10HmaX-0005vi-00 delivery delivery_ip <127.0.0.1> deliver_port <1224> delivery_fqdn <127.0.0.1> local_part domain confirmation <250 OK> errno <0> errstr <> router <> transport <> 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 End queue run: pid=pppp -qqf +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 SMTP timeout while connected to 127.0.0.1 [127.0.0.1] after EHLO the.local.host.name: Connection timed out +1999-03-02 09:44:33 10HmaY-0005vi-00 deferral delivery_ip <127.0.0.1> deliver_port <1224> delivery_fqdn <127.0.0.1> local_part domain confirmation <> errno <110> errstr router <> transport +1999-03-02 09:44:33 10HmaY-0005vi-00 == userx@domain1.com R=others T=smtp defer (dd): Connection timed out: SMTP timeout while connected to 127.0.0.1 [127.0.0.1] after EHLO the.local.host.name +1999-03-02 09:44:33 10HmaY-0005vi-00 ** userx@domain1.com: retry timeout exceeded +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 SMTP timeout while connected to 127.0.0.1 [127.0.0.1] after initial connection: Connection timed out +1999-03-02 09:44:33 10HmaZ-0005vi-00 deferral delivery_ip <127.0.0.1> deliver_port <1224> delivery_fqdn <127.0.0.1> local_part domain confirmation <> errno <110> errstr router <> transport +1999-03-02 09:44:33 10HmaZ-0005vi-00 == CALLER@the.local.host.name R=others T=smtp defer (dd): Connection timed out: SMTP timeout while connected to 127.0.0.1 [127.0.0.1] after initial connection +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** CALLER@the.local.host.name: retry timeout exceeded +1999-03-02 09:44:33 10HmaZ-0005vi-00 CALLER@the.local.host.name: error ignored +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/scripts/5700-deliv-log/5700 b/test/scripts/5700-deliv-log/5700 index 62c7dd24f..2082b14f5 100644 --- a/test/scripts/5700-deliv-log/5700 +++ b/test/scripts/5700-deliv-log/5700 @@ -4,7 +4,7 @@ need_ipv4 # exim -odq userx@domain1 -Test message 1 +A deliverable message **** server PORT_S 220 ESMTP @@ -24,3 +24,16 @@ QUIT **** exim -d+deliver+expand+acl -qqf **** +# +# +# +server PORT_S +220 ESMTP +EHLO +*sleep 4 +**** +exim -d-all+deliver+acl+expand -odi userx@domain1.com +A message which will hit a timeout +. +**** + diff --git a/test/stdout/5700 b/test/stdout/5700 index fd8bd602a..32c3c8948 100644 --- a/test/stdout/5700 +++ b/test/stdout/5700 @@ -20,9 +20,15 @@ Message-Id: From: CALLER_NAME Date: Tue, 2 Mar 1999 09:44:33 +0000 -Test message 1 +A deliverable message . 250 OK QUIT 220 OK End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +EHLO the.local.host.name +*sleep 4 +End of script