Fix build with DISABLE_EVENT (proper spelling)
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 15 Jun 2024 12:20:07 +0000 (13:20 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 19 Jun 2024 09:46:08 +0000 (10:46 +0100)
cf. 04c21a8fe3b5

src/src/dns.c
test/confs/0612
test/confs/4020
test/confs/5890
test/confs/5891
test/confs/5892
test/confs/5893
test/confs/5894
test/confs/5895
test/scripts/5700-events/5700

index 538c0c0b44e244f23fc4a771c018a8ccb6de9a48..45dc1574dc6b50feaf5ac8918e10b02508a0fe1e 100644 (file)
@@ -1135,7 +1135,7 @@ errstr = US"cname_loop";
 
 not_good:
   {
-#ifndef DISABLE_EVENTS
+#ifndef DISABLE_EVENT
   const uschar * s = NULL;
   BOOL save_flag = f.search_find_defer;
   uschar * save_serr = search_error_message;
@@ -1168,7 +1168,7 @@ not_good:
   /*XXX what other state could an expansion in the eventhandler mess up? */
   search_error_message = save_serr;
   f.search_find_defer = save_flag;
-#endif /*EVENTS*/
+#endif /*EVENT*/
   return rc;
   }
 }
index 786b2e58eac82d6d608f70945c26049044c3db6e..f4f4272461e52be4f404d01d74ab226a1f4356d1 100644 (file)
@@ -24,14 +24,18 @@ queue_only
 queue_run_in_order
 
 
+.ifdef _HAVE_EVENT
 event_action = ${acl {ev_log}}
+.endif
 
 #
 
 begin acl
 
+.ifdef _HAVE_EVENT
 ev_log:
   accept logwrite = event $event_name
+.endif
 
 rcpt:
   accept       hosts = HOSTIPV4
@@ -76,20 +80,26 @@ begin transports
 
 smtp:
   driver =     smtp
+.ifdef _HAVE_EVENT
   event_action = ${acl {ev_log}}
+.endif
   hosts_try_fastopen = :
 
 bad_tpt:
   driver =     smtp
   connect_timeout = 1s
+.ifdef _HAVE_EVENT
   event_action = ${acl {ev_log}}
+.endif
 
 tofile:
   driver = appendfile
   file = DIR/test-mail/$local_part
   create_file = DIR/test-mail
   user = CALLER
+.ifdef _HAVE_EVENT
   event_action = ${acl {ev_log}}
+.endif
 
 begin retry
 
index dc0db460e9b7a48d5333942b544ef2f5de2f29e4..6702dcd6895e8a41f1ac02a62faa12c9e5b9fd43 100644 (file)
@@ -46,7 +46,9 @@ my_smtp:
   hide socks_proxy =   HOSTIPV4 port=PORT_D OPT
   hosts_try_fastopen = ${if eq {$local_part}{user_tfo} {*}}
   debug_print =                transport_name <$transport_name>
+.ifdef _HAVE_EVENT
   event_action =       ${if eq {smtp:connect}{$event_name} {${acl {logger}}} {}}
+.endif
 
 
 # End
index ff5adb90f32c41652adb67d6e9c876de406deb02..c81cd92f32a0c6bb78deabfe1a2b25a3312f128a 100644 (file)
@@ -103,7 +103,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver =                     smtp
@@ -113,7 +115,9 @@ send_to_server2:
   hosts_try_fastopen =         :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index 89ee8fd53f439aefa414821584729a3324cde866..ff50b2b2ec667ae3a62d03b8b75dcf09e1ff1420 100644 (file)
@@ -93,7 +93,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver = smtp
@@ -103,7 +105,9 @@ send_to_server2:
   hosts_try_fastopen = :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index 571cb8e7e1b36e41ce84802328e26fdc3b551139..77b5c9052f8b079d9789b76fcc4ccda3a256f938 100644 (file)
@@ -108,7 +108,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver =                     smtp
@@ -118,7 +120,9 @@ send_to_server2:
   hosts_try_fastopen =         :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index a7f73a98cb218b687b365c2d88e1c897eb70484c..5d569d7084c6eb4b41846dd401d290dc520f0ae1 100644 (file)
@@ -97,7 +97,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver = smtp
@@ -107,7 +109,9 @@ send_to_server2:
   hosts_try_fastopen = :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index 4b34c75aeb44eea2622f784982f8424624f82240..d823290aa7916cc9bc54e92030755ff353a47048 100644 (file)
@@ -99,7 +99,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver =                     smtp
@@ -109,7 +111,9 @@ send_to_server2:
   hosts_try_fastopen =         :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index d279b1e3ee01046fdb10d7bd0750269b37a2662b..c83c70926962e3de1229dfa66bac544187d343d7 100644 (file)
@@ -92,7 +92,9 @@ send_to_server1:
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  ${if match {$local_part}{^noverify} {*}{:}}
   tls_try_verify_hosts =       *
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 send_to_server2:
   driver = smtp
@@ -102,7 +104,9 @@ send_to_server2:
   hosts_try_fastopen = :
   tls_verify_certificates =    CDIR/CA/CA.pem
   tls_verify_cert_hostnames =  :
+.ifdef _HAVE_EVENT
   event_action =               ${acl {log_resumption}}
+.endif
 
 
 # ----- Retry -----
index c6b6e76ff096b57d8c0e75725dbdb3be5f4282d2..bb62c199101ee83354354a3f2ca5243a013949d2 100644 (file)
@@ -1,5 +1,4 @@
-# Arbitrary expansion after transport
-# (EXPERIMENTAL_EVENT)
+# Events
 #
 need_ipv4
 munge timeout_errno