Testsuite: clarify testcase for dnsdb dns:fail event.
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 7 May 2024 12:12:14 +0000 (13:12 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 7 May 2024 12:12:14 +0000 (13:12 +0100)
doc/doc-docbook/spec.xfpt
test/confs/5709
test/log/5708
test/log/5709 [new file with mode: 0644]
test/runtest
test/scripts/5709_dnsdb_events/5709
test/stderr/5709 [deleted file]
test/stdout/5709

index af5f51d6c4de2b925c2010d2d9527e8cc702b0ad..35db1978dc4c350d05eb1d1252532c0bb12d553b 100644 (file)
@@ -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
+
 . ////////////////////////////////////////////////////////////////////////////
 . ////////////////////////////////////////////////////////////////////////////
 
index e663b86b6d2c31b082529073d907c2551aa24018..5539cddebdbe40190bdc6d8d61cd21657098bc76 100644 (file)
@@ -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
index 89eba81072332d2e1b242c07255c019c8da5383e..def9f94e46232fa787b326a38ff188f014a30e48 100644 (file)
@@ -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@nonexistent.test.ex <bad_A@nonexistent.test.ex> R=all T=all defer (-32): failed to lookup IP address for nonexistent.test.ex
diff --git a/test/log/5709 b/test/log/5709
new file mode 100644 (file)
index 0000000..b7cd779
--- /dev/null
@@ -0,0 +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>
index afcdd0c2f37ddac11d4c4dc92eb1ce637cf9df50..91a81510e6abe0afb88827be1cb9466e467a73eb 100755 (executable)
@@ -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 ========
index 03ca7ed62cac21b5998566bc21d5381f3049cebc..583df5f1ae638f26c765ad036f5de1de1ad2e788 100644 (file)
@@ -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/stderr/5709 b/test/stderr/5709
deleted file mode 100644 (file)
index 279f0ba..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-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>
index c1a7fdeb8d7dfa9ffcdb2cef31c57ef7f1aceb33..5f68af5c1b495268609fcf3fe1695bba3e4ce1e1 100644 (file)
@@ -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