[exim-cvs] Testsuite: clarify testcase for dnsdb dns:fail ev…

Página Inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] Testsuite: clarify testcase for dnsdb dns:fail event.
Gitweb: https://git.exim.org/exim.git/commitdiff/15a68d6eb3fb6f20f8ee0a7bf97e665d6c952a60
Commit:     15a68d6eb3fb6f20f8ee0a7bf97e665d6c952a60
Parent:     cf9f324212bddcc09f405b94b9a01a5c99ffe19b
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Tue May 7 13:12:14 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue May 7 13:12:14 2024 +0100


    Testsuite: clarify testcase for dnsdb dns:fail event.
---
 doc/doc-docbook/spec.xfpt           |  7 +++++++
 test/confs/5709                     |  2 ++
 test/log/5708                       |  4 ----
 test/{stderr => log}/5709           |  3 +++
 test/runtest                        |  3 +++
 test/scripts/5709_dnsdb_events/5709 | 23 +++++++++++++++++------
 test/stdout/5709                    | 24 +++++++++++++++++++-----
 7 files changed, 51 insertions(+), 15 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index af5f51d6c..35db1978d 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -43016,7 +43016,9 @@ Events have names which correspond to the point in process at which they fire.
The name is placed in the variable &$event_name$& and the event action
expansion must check this, as it will be called for every possible event type.

+.new
 The current list of events is:
+.wen
 .itable all 0 0 4 25* left 10* center 15* center 50* left
 .row auth:fail            after    both    "per driver per authentication attempt"
 .row dane:fail              after    transport  "per connection"
@@ -43104,6 +43106,11 @@ chain element received on the connection.
 For OpenSSL it will trigger for every chain element including those
 loaded locally.


+.new
+For dns:fail events from dnsdb lookups, a &"defer_never"& option does not
+affect the reporting of DNS_AGAIN.
+.wen
+
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////

diff --git a/test/confs/5709 b/test/confs/5709
index e663b86b6..5539cddeb 100644
--- a/test/confs/5709
+++ b/test/confs/5709
@@ -5,4 +5,6 @@
primary_hostname = myhost.test.ex
event_action = ${acl {accept logwrite = <$event_name> <$event_data>}}

+acl_smtp_helo = accept continue = ${lookup dnsdb{defer_never,a=$sender_helo_name}{$value}}
+
# End
diff --git a/test/log/5708 b/test/log/5708
index 89eba8107..def9f94e4 100644
--- a/test/log/5708
+++ b/test/log/5708
@@ -1,16 +1,12 @@

 ******** SERVER ********
 1999-03-02 09:44:33 exim x.yz daemon started: pid=p1234, no queue runs, listening for SMTP on port PORT_D
-1999-03-02 09:44:33 M <dns:fail> <DNS_NOMATCH:nonexistent.test.ex:AAAA>
 1999-03-02 09:44:33 M <dns:fail> <DNS_NOMATCH:nonexistent.test.ex:A>
 1999-03-02 09:44:33 H=(nonexistent.test.ex) [127.0.0.1] F=<a@b> rejected RCPT <c@d>
-1999-03-02 09:44:33 M <dns:fail> <DNS_NOMATCH:rhubarb.test.ex:AAAA>
 1999-03-02 09:44:33 M <dns:fail> <DNS_NOMATCH:rhubarb.test.ex:A>
 1999-03-02 09:44:33 H=(badcname.test.ex) [127.0.0.1] F=<a@b> rejected RCPT <c@d>
-1999-03-02 09:44:33 M <dns:fail> <DNS_AGAIN:test.again.dns:AAAA>
 1999-03-02 09:44:33 M <dns:fail> <DNS_AGAIN:test.again.dns:A>
 1999-03-02 09:44:33 H=(test.again.dns) [127.0.0.1] F=<a@b> rejected RCPT <c@d>
 1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= a@b H=(localhost) [127.0.0.1] P=smtp S=sss
-1999-03-02 09:44:33 10HmaX-000000005vi-0000 T <dns:fail> <DNS_NOMATCH:nonexistent.test.ex:AAAA>
 1999-03-02 09:44:33 10HmaX-000000005vi-0000 T <dns:fail> <DNS_NOMATCH:nonexistent.test.ex:A>
 1999-03-02 09:44:33 10HmaX-000000005vi-0000 == bad_a@??? <bad_A@???> R=all T=all defer (-32): failed to lookup IP address for nonexistent.test.ex
diff --git a/test/stderr/5709 b/test/log/5709
similarity index 59%
rename from test/stderr/5709
rename to test/log/5709
index 279f0ba66..b7cd77918 100644
--- a/test/stderr/5709
+++ b/test/log/5709
@@ -1,3 +1,6 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=p1234, no queue runs, listening for SMTP on port PORT_D
 1999-03-02 09:44:33 <dns:fail> <DNS_NOMATCH:nonexistent.test.ex:A>
 1999-03-02 09:44:33 <dns:fail> <DNS_NOMATCH:rhubarb.test.ex:A>
 1999-03-02 09:44:33 <dns:fail> <DNS_AGAIN:test.again.dns:A>
diff --git a/test/runtest b/test/runtest
index afcdd0c2f..91a81510e 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1659,6 +1659,9 @@ RESET_AFTER_EXTRA_LINE_READ:
     s/TLS error on connection from .*\K(SSL_accept: TCP connection closed by peer|\(gnutls_handshake\): The TLS connection was non-properly terminated.)/(tls lib accept fn): TCP connection closed by peer/;
     s/TLS session: \K\(gnutls_handshake\): rxd alert: No supported application protocol could be negotiated/(SSL_connect): error: <<detail omitted>>/;
     s/\(gnutls_handshake\): No common application protocol could be negotiated./(SSL_accept): error: <<detail omitted>>/;
+
+    # Not all buildfarm animals have ipv6
+    next if /<dns:fail> <DNS_(?:NOMATCH|AGAIN):.*:AAAA>$/ ;
     }


   # ======== mail ========
diff --git a/test/scripts/5709_dnsdb_events/5709 b/test/scripts/5709_dnsdb_events/5709
index 03ca7ed62..583df5f1a 100644
--- a/test/scripts/5709_dnsdb_events/5709
+++ b/test/scripts/5709_dnsdb_events/5709
@@ -1,8 +1,19 @@
 # event on dnsdb lookup fail
-
-exim -be
-bad_a            ${lookup dnsdb{a=nonexistent.test.ex}{$value}{FAIL}}
-badcname        ${lookup dnsdb{a=badcname.test.ex}{$value}{FAIL}}
-defer            ${lookup dnsdb{a=test.again.dns}{$value}{FAIL}}
-good            ${lookup dnsdb{txt=test.ex}{$value}{FAIL}}
+#
+exim -bd -DSERVER=server -oX PORT_D
 ****
+client 127.0.0.1 PORT_D
+??? 220
+HELO nonexistent.test.ex
+??? 250
+HELO badcname.test.ex
+??? 250
+HELO test.again.dns
+??? 250
+HELO localhost
+??? 250
+QUIT
+??? 221
+****
+killdaemon
+no_stderr_check
diff --git a/test/stdout/5709 b/test/stdout/5709
index c1a7fdeb8..5f68af5c1 100644
--- a/test/stdout/5709
+++ b/test/stdout/5709
@@ -1,5 +1,19 @@
-> bad_a            FAIL
-> badcname        FAIL
-> Failed: lookup of "a=test.again.dns" gave DEFER: 
-> good            A TXT record for test.ex.
-> 
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> HELO nonexistent.test.ex
+??? 250
+<<< 250 myhost.test.ex Hello nonexistent.test.ex [127.0.0.1]
+>>> HELO badcname.test.ex
+??? 250
+<<< 250 myhost.test.ex Hello badcname.test.ex [127.0.0.1]
+>>> HELO test.again.dns
+??? 250
+<<< 250 myhost.test.ex Hello test.again.dns [127.0.0.1]
+>>> HELO localhost
+??? 250
+<<< 250 myhost.test.ex Hello localhost [127.0.0.1]
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/