[exim-cvs] Rename facility to Event Actions, ifdeffed on EXP…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Rename facility to Event Actions, ifdeffed on EXPERIMENTAL_EVENT
Gitweb: http://git.exim.org/exim.git/commitdiff/774ef2d7d0f7fffbfd114271b8567e36485898dc
Commit:     774ef2d7d0f7fffbfd114271b8567e36485898dc
Parent:     b9c5223b77400cec8c44a8972a238f9cde82f0fc
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Oct 18 20:38:07 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Oct 25 21:37:59 2014 +0100


    Rename facility to Event Actions, ifdeffed on EXPERIMENTAL_EVENT
---
 doc/doc-txt/ChangeLog                          |    5 ++
 doc/doc-txt/experimental-spec.txt              |   50 ++++++++++++-----------
 src/src/EDITME                                 |    4 +-
 src/src/config.h.defaults                      |    2 +-
 src/src/deliver.c                              |   44 ++++++++++----------
 src/src/exim.c                                 |    4 +-
 src/src/expand.c                               |   16 ++++----
 src/src/functions.h                            |    9 ++--
 src/src/globals.c                              |   14 +++---
 src/src/globals.h                              |   15 ++++---
 src/src/readconf.c                             |    6 +-
 src/src/smtp_out.c                             |   10 ++--
 src/src/structs.h                              |    4 +-
 src/src/tls-gnu.c                              |   22 +++++-----
 src/src/tls-openssl.c                          |   22 +++++-----
 src/src/transport.c                            |    8 ++--
 src/src/transports/smtp.c                      |   34 ++++++++--------
 src/src/verify.c                               |   16 ++++----
 test/confs/5608                                |   12 +++---
 test/confs/5658                                |   12 +++---
 test/confs/5700                                |   36 ++++++++--------
 test/confs/5750                                |   10 ++--
 test/confs/5760                                |   10 ++--
 test/confs/5860                                |   10 ++--
 test/log/5700                                  |    2 +-
 test/paniclog/5700                             |    2 +-
 test/scripts/5608-OCSP-OpenSSL-TPDA/REQUIRES   |    2 +-
 test/scripts/5658-OCSP-GnuTLS-TPDA/REQUIRES    |    2 +-
 test/scripts/5700-tpt-post-dlv-action/REQUIRES |    2 +-
 test/scripts/5750-GnuTLS-TPDA/REQUIRES         |    2 +-
 test/scripts/5760-OpenSSL-TPDA/REQUIRES        |    2 +-
 test/scripts/5860-DANE-OpenSSL-TPDA/REQUIRES   |    2 +-
 test/stderr/5700                               |    2 +-
 33 files changed, 200 insertions(+), 193 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 8b3dfe8..9fece77 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -51,6 +51,11 @@ JH/06 Bug 1533: Fix truncation of items in headers_remove lists.  A fixed
 JH/07 Add support for directories of certificates when compiled with a GnuTLS
       version 3.3.6 or later.


+JH/08 Rename the TPDA expermimental facility to Event Actions.  The #ifdef
+      is EXPERIMENTAL_EVENT, the main-configuration and transport options
+      both become "event_action", the variables become $event_name, $event_data
+      and $event_defer_errno.
+


Exim version 4.84
-----------------
diff --git a/doc/doc-txt/experimental-spec.txt b/doc/doc-txt/experimental-spec.txt
index e7a0d06..2d34de0 100644
--- a/doc/doc-txt/experimental-spec.txt
+++ b/doc/doc-txt/experimental-spec.txt
@@ -759,11 +759,12 @@ b. Configure, somewhere before the DATA ACL, the control option to



-Transport post-delivery actions
+Event Actions
--------------------------------------------------------------

-An arbitrary per-transport string can be expanded upon various transport events
-and (for SMTP transports) a second string on deferrals caused by a host error.
+(Renamed from TPDA, Transport post-delivery actions)
+
+An arbitrary per-transport string can be expanded upon various transport events.
Additionally a main-section configuration option can be expanded on some
per-message events.
This feature may be used, for example, to write exim internal log information
@@ -771,33 +772,33 @@ This feature may be used, for example, to write exim internal log information

In order to use the feature, you must compile with

-EXPERIMENTAL_TPDA=yes
+EXPERIMENTAL_EVENT=yes

in your Local/Makefile

and define one or both of
-- the tpda_event_action option in the transport
-- the delivery_event_action
+- the event_action option in the transport
+- the event_action main option
to be expanded when the event fires.

-A new variable, $tpda_event, is set to the event type when the
+A new variable, $event_name, is set to the event type when the
expansion is done. The current list of events is:

-    msg:complete        main        per message
-    msg:delivery        transport    per recipient
-    msg:host:defer        transport    per attempt
-    msg:fail:delivery    main        per recipient
-    msg:fail:internal    main        per recipient
-    tcp:connect        transport    per connection
-    tcp:close        transport    per connection
-    tls:cert        transport    per certificate in verification chain
-    smtp:connect        transport    per connection
-
-The expansion is called for all event types, and should use the $tpda_event
+ msg:complete        after  main      per message
+ msg:delivery        after  transport  per recipient
+ msg:host:defer        after  transport  per attempt
+ msg:fail:delivery    after  main      per recipient
+ msg:fail:internal    after  main      per recipient
+ tcp:connect        before transport  per connection
+ tcp:close        after  transport  per connection
+ tls:cert        before transport  per certificate in verification chain
+ smtp:connect        after  transport  per connection
+
+The expansion is called for all event types, and should use the $event_name
 value to decide when to act.  The variable data is a colon-separated
 list, describing an event tree.


-There is an auxilary variable, $tpda_data, for which the
+There is an auxilary variable, $event_data, for which the
content is event_dependent:

     msg:delivery        smtp confirmation mssage
@@ -805,7 +806,7 @@ content is event_dependent:
     tls:cert        verification chain depth
     smtp:connect        smtp banner


-The msg:host:defer event populates one extra variable, $tpda_defer_errno.
+The msg:host:defer event populates one extra variable, $event_defer_errno.

The following variables are likely to be useful depending on the event type:

@@ -820,7 +821,7 @@ The following variables are likely to be useful depending on the event type:

An example might look like:

-tpda_event_action = ${if = {msg:delivery}{$tpda_event} \
+event_action = ${if = {msg:delivery}{$event_name} \
 {${lookup pgsql {SELECT * FROM record_Delivery( \
     '${quote_pgsql:$sender_address_domain}',\
     '${quote_pgsql:${lc:$sender_address_local_part}}', \
@@ -831,12 +832,12 @@ tpda_event_action = ${if = {msg:delivery}{$tpda_event} \
     '${quote_pgsql:$message_exim_id}')}} \
 } {}}


-The string is expanded for each of the supported events and any
-side-effects will happen. The result is then discarded.
+The string is expanded when each of the supported events occur
+and any side-effects of the expansion will happen.
Note that for complex operations an ACL expansion can be used.


-The expansion of the tpda_event_action option should normally
+The expansion of the event_action option should normally
return an empty string. Should it return anything else the
following will be forced:

@@ -848,6 +849,7 @@ following will be forced:
     tls:cert    refuse verification
     smtp:connect    close connection


+No other use is made of the result string.



diff --git a/src/src/EDITME b/src/src/EDITME
index 01c4ebc..4a290a4 100644
--- a/src/src/EDITME
+++ b/src/src/EDITME
@@ -473,9 +473,9 @@ EXIM_MONITOR=eximon.bin
# LDFLAGS += -lopendmarc


-# Uncomment the following line to support Transport post-delivery actions,
+# Uncomment the following line to support Events,
# eg. for logging to a database.
-# EXPERIMENTAL_TPDA=yes
+# EXPERIMENTAL_EVENT=yes

# Uncomment the following line to add Redis lookup support
# You need to have hiredis installed on your system (https://github.com/redis/hiredis).
diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults
index 49ab276..a0997a0 100644
--- a/src/src/config.h.defaults
+++ b/src/src/config.h.defaults
@@ -176,7 +176,7 @@ it's a default value. */
#define EXPERIMENTAL_REDIS
#define EXPERIMENTAL_SPF
#define EXPERIMENTAL_SRS
-#define EXPERIMENTAL_TPDA
+#define EXPERIMENTAL_EVENT

/* For developers */
#define WANT_DEEPER_PRINTF_CHECKS
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 4462d5c..4cc05b4 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -718,27 +718,27 @@ d_tlslog(uschar * s, int * sizep, int * ptrp, address_item * addr)



-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
 int
-tpda_raise_event(uschar * action, uschar * event, uschar * ev_data)
+event_raise(uschar * action, uschar * event, uschar * ev_data)
 {
 uschar * s;
 if (action)
   {
   DEBUG(D_deliver)
-    debug_printf("TPDA(%s): tpda_event_action=|%s| tpda_delivery_IP=%s\n",
+    debug_printf("Event(%s): event_action=|%s| delivery_IP=%s\n",
       event,
       action, deliver_host_address);


- tpda_event = event;
- tpda_data = ev_data;
+ event_name = event;
+ event_data = ev_data;

   if (!(s = expand_string(action)) && *expand_string_message)
     log_write(0, LOG_MAIN|LOG_PANIC,
-      "failed to expand tpda_event_action %s in %s: %s\n",
+      "failed to expand event_action %s in %s: %s\n",
       event, transport_name, expand_string_message);


- tpda_event = tpda_data = NULL;
+ event_name = event_data = NULL;

   /* If the expansion returns anything but an empty string, flag for
   the caller to modify his normal processing
@@ -746,7 +746,7 @@ if (action)
   if (s && *s)
     {
     DEBUG(D_deliver)
-      debug_printf("TPDA(%s): event_action returned \"%s\"\n", event, s);
+      debug_printf("Event(%s): event_action returned \"%s\"\n", event, s);
     return DEFER;
     }
   }
@@ -754,7 +754,7 @@ return OK;
 }


static void
-tpda_msg_event(uschar * event, address_item * addr)
+msg_event_raise(uschar * event, address_item * addr)
{
uschar * save_domain = deliver_domain;
uschar * save_local = deliver_localpart;
@@ -769,7 +769,7 @@ deliver_domain = addr->domain;
deliver_localpart = addr->local_part;
deliver_host = addr->host_used ? addr->host_used->name : NULL;

-(void) tpda_raise_event(addr->transport->tpda_event_action, event,
+(void) event_raise(addr->transport->event_action, event,
       addr->host_used || Ustrcmp(addr->transport->driver_name, "lmtp") == 0
       ? addr->message : NULL);


@@ -778,7 +778,7 @@ deliver_localpart = save_local;
 deliver_domain =    save_domain;
 router_name = transport_name = NULL;
 }
-#endif    /*EXPERIMENTAL_TPDA*/
+#endif    /*EXPERIMENTAL_EVENT*/




@@ -803,7 +803,7 @@ the log line, and reset the store afterwards. Remote deliveries should always
have a pointer to the host item that succeeded; local deliveries can have a
pointer to a single host item in their host list, for use by the transport. */

-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
   /* presume no successful remote delivery */
   lookup_dnssec_authenticated = NULL;
 #endif
@@ -870,7 +870,7 @@ else
     if (continue_sequence > 1)
       s = string_cat(s, &size, &ptr, US"*", 1);


-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
     deliver_host_address = addr->host_used->address;
     deliver_host_port =    addr->host_used->port;
     deliver_host =         addr->host_used->name;
@@ -939,8 +939,8 @@ store we used to build the line after writing it. */
 s[ptr] = 0;
 log_write(0, flags, "%s", s);


-#ifdef EXPERIMENTAL_TPDA
-if (!msg) tpda_msg_event(US"msg:delivery", addr);
+#ifdef EXPERIMENTAL_EVENT
+if (!msg) msg_event_raise(US"msg:delivery", addr);
#endif

 store_reset(reset_point);
@@ -1138,7 +1138,7 @@ if (result == OK)
     child_done(addr, now);
     }


- /* Certificates for logging (via TPDA) */
+ /* Certificates for logging (via events) */
#ifdef SUPPORT_TLS
tls_out.ourcert = addr->ourcert;
addr->ourcert = NULL;
@@ -1381,8 +1381,8 @@ else

log_write(0, LOG_MAIN, "** %s", s);

-#ifdef EXPERIMENTAL_TPDA
- tpda_msg_event(US"msg:fail:delivery", addr);
+#ifdef EXPERIMENTAL_EVENT
+ msg_event_raise(US"msg:fail:delivery", addr);
#endif

   store_reset(reset_point);
@@ -5585,7 +5585,7 @@ if (process_recipients != RECIP_IGNORE)
         break;
         }


-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
       if (process_recipients != RECIP_ACCEPT)
     {
     uschar * save_local =  deliver_localpart;
@@ -5596,7 +5596,7 @@ if (process_recipients != RECIP_IGNORE)
     deliver_domain =    expand_string(
               string_sprintf("${domain:%s}", new->address));


-    (void) tpda_raise_event(delivery_event_action,
+    (void) event_raise(event_action,
               US"msg:fail:internal", new->message);


     deliver_localpart = save_local;
@@ -7364,8 +7364,8 @@ if (addr_defer == NULL)
   /* Unset deliver_freeze so that we won't try to move the spool files further down */
   deliver_freeze = FALSE;


-#ifdef EXPERIMENTAL_TPDA
- (void) tpda_raise_event(delivery_event_action, US"msg:complete", NULL);
+#ifdef EXPERIMENTAL_EVENT
+ (void) event_raise(event_action, US"msg:complete", NULL);
#endif
}

diff --git a/src/src/exim.c b/src/src/exim.c
index 85a7c81..5faa6f9 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -839,8 +839,8 @@ fprintf(f, "Support for:");
 #ifdef EXPERIMENTAL_PROXY
   fprintf(f, " Experimental_Proxy");
 #endif
-#ifdef EXPERIMENTAL_TPDA
-  fprintf(f, " Experimental_TPDA");
+#ifdef EXPERIMENTAL_EVENT
+  fprintf(f, " Experimental_Event");
 #endif
 #ifdef EXPERIMENTAL_REDIS
   fprintf(f, " Experimental_Redis");
diff --git a/src/src/expand.c b/src/src/expand.c
index 8e94c3e..623d3f2 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -490,6 +490,14 @@ static var_entry var_table[] = {
   { "dnslist_value",       vtype_stringptr,   &dnslist_value },
   { "domain",              vtype_stringptr,   &deliver_domain },
   { "domain_data",         vtype_stringptr,   &deliver_domain_data },
+#ifdef EXPERIMENTAL_EVENT
+  { "event_data",          vtype_stringptr,   &event_data },
+
+  /*XXX want to use generic vars for as many of these as possible*/
+  { "event_defer_errno",   vtype_int,         &event_defer_errno },
+
+  { "event_name",          vtype_stringptr,   &event_name },
+#endif
   { "exim_gid",            vtype_gid,         &exim_gid },
   { "exim_path",           vtype_stringptr,   &exim_path },
   { "exim_uid",            vtype_uid,         &exim_uid },
@@ -714,14 +722,6 @@ static var_entry var_table[] = {
   { "tod_logfile",         vtype_todlf,       NULL },
   { "tod_zone",            vtype_todzone,     NULL },
   { "tod_zulu",            vtype_todzulu,     NULL },
-#ifdef EXPERIMENTAL_TPDA
-  { "tpda_data",           vtype_stringptr,   &tpda_data },
-
-  /*XXX want to use generic vars for as many of these as possible*/
-  { "tpda_defer_errno",     vtype_int,         &tpda_defer_errno },
-
-  { "tpda_event",          vtype_stringptr,   &tpda_event },
-#endif
   { "transport_name",      vtype_stringptr,   &transport_name },
   { "value",               vtype_stringptr,   &lookup_value },
   { "version_number",      vtype_stringptr,   &version_string },
diff --git a/src/src/functions.h b/src/src/functions.h
index 6328416..ba4760f 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -157,6 +157,9 @@ extern BOOL    dscp_lookup(const uschar *, int, int *, int *, int *);


 extern void    enq_end(uschar *);
 extern BOOL    enq_start(uschar *);
+#ifdef EXPERIMENTAL_EVENT
+extern int     event_raise(uschar *, uschar *, uschar *);
+#endif
 extern void    exim_exit(int);
 extern void    exim_nullstd(void);
 extern void    exim_setugid(uid_t, gid_t, BOOL, uschar *);
@@ -347,7 +350,7 @@ extern void    sigalrm_handler(int);
 extern BOOL    smtp_buffered(void);
 extern void    smtp_closedown(uschar *);
 extern int     smtp_connect(host_item *, int, int, uschar *, int, BOOL, const uschar *
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
                , uschar *
 #endif
                );
@@ -409,10 +412,6 @@ extern uschar *strstric(uschar *, uschar *, BOOL);


extern uschar *tod_stamp(int);

-#ifdef EXPERIMENTAL_TPDA
-extern int     tpda_raise_event(uschar *, uschar *, uschar *);
-#endif
-
 extern void    tls_modify_variables(tls_support *);
 extern BOOL    transport_check_waiting(uschar *, uschar *, int, uschar *,
                  BOOL *);
diff --git a/src/src/globals.c b/src/src/globals.c
index 22bd69e..fb3ea32 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1336,11 +1336,11 @@ int     thismessage_size_limit = 0;
 int     timeout_frozen_after   = 0;
 BOOL    timestamps_utc         = FALSE;


-#ifdef EXPERIMENTAL_TPDA
-int     tpda_defer_errno        = 0;
-uschar *tpda_event              = NULL;    /* event name */
-uschar *tpda_data               = NULL;    /* auxilary data for event */
-uschar *delivery_event_action   = NULL;    /* expansion for delivery events */
+#ifdef EXPERIMENTAL_EVENT
+uschar *event_action             = NULL;    /* expansion for delivery events */
+uschar *event_data               = NULL;    /* auxilary data variable for event */
+int     event_defer_errno        = 0;
+uschar *event_name               = NULL;    /* event name variable */
 #endif


 transport_instance  *transports = NULL;
@@ -1395,8 +1395,8 @@ transport_instance  transport_defaults = {
     FALSE,                    /* log_defer_output */
     TRUE_UNSET                /* retry_use_local_part: BOOL, but set neither
                                  1 nor 0 so can detect unset */
-#ifdef EXPERIMENTAL_TPDA
-   ,NULL              /* tpda_event_action */
+#ifdef EXPERIMENTAL_EVENT
+   ,NULL              /* event_action */
 #endif
 };


diff --git a/src/src/globals.h b/src/src/globals.h
index 800ec9c..c335c34 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -418,6 +418,14 @@ extern int     error_handling;         /* Error handling style */
 extern uschar *errors_copy;            /* For taking copies of errors */
 extern uschar *errors_reply_to;        /* Reply-to for error messages */
 extern int     errors_sender_rc;       /* Return after message to sender*/
+
+#ifdef EXPERIMENTAL_EVENT
+extern uschar *event_action;           /* expansion for delivery events */
+extern uschar *event_data;           /* event data */
+extern int     event_defer_errno;      /* error number set when a remote delivery is deferred with a host error */
+extern uschar *event_name;           /* event classification */
+#endif
+
 extern gid_t   exim_gid;               /* To be used with exim_uid */
 extern BOOL    exim_gid_set;           /* TRUE if exim_gid set */
 extern uschar *exim_path;              /* Path to exec exim */
@@ -876,13 +884,6 @@ extern int     thismessage_size_limit; /* Limit for this message */
 extern int     timeout_frozen_after;   /* Max time to keep frozen messages */
 extern BOOL    timestamps_utc;         /* Use UTC for all times */


-#ifdef EXPERIMENTAL_TPDA
-extern int     tpda_defer_errno;        /* error number set when a remote delivery is deferred with a host error */
-extern uschar *tpda_event;        /* event classification */
-extern uschar *tpda_data;        /* event data */
-extern uschar *delivery_event_action;   /* expansion for delivery events */
-#endif
-
 extern uschar *transport_name;         /* Name of transport last started */
 extern int     transport_count;        /* Count of bytes transported */
 extern int     transport_newlines;     /* Accurate count of number of newline chars transported */
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 2e18b67..074ed96 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -205,9 +205,6 @@ static optionlist optionlist_config[] = {
   { "deliver_drop_privilege",   opt_bool,        &deliver_drop_privilege },
   { "deliver_queue_load_max",   opt_fixed,       &deliver_queue_load_max },
   { "delivery_date_remove",     opt_bool,        &delivery_date_remove },
-#ifdef EXPERIMENTAL_TPDA
-  { "delivery_event_action",    opt_stringptr,   &delivery_event_action },
-#endif
 #ifdef ENABLE_DISABLE_FSYNC
   { "disable_fsync",            opt_bool,        &disable_fsync },
 #endif
@@ -239,6 +236,9 @@ static optionlist optionlist_config[] = {
   { "envelope_to_remove",       opt_bool,        &envelope_to_remove },
   { "errors_copy",              opt_stringptr,   &errors_copy },
   { "errors_reply_to",          opt_stringptr,   &errors_reply_to },
+#ifdef EXPERIMENTAL_EVENT
+  { "event_action",             opt_stringptr,   &event_action },
+#endif
   { "exim_group",               opt_gid,         &exim_gid },
   { "exim_path",                opt_stringptr,   &exim_path },
   { "exim_user",                opt_uid,         &exim_uid },
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index 4920b73..e3f2588 100644
--- a/src/src/smtp_out.c
+++ b/src/src/smtp_out.c
@@ -165,7 +165,7 @@ Arguments:
   timeout     timeout value or 0
   keepalive   TRUE to use keepalive
   dscp        DSCP value to assign to socket
-  tpda_event  event expansion
+  event       event expansion


 Returns:      connected socket number, or -1 with errno set
 */
@@ -173,8 +173,8 @@ Returns:      connected socket number, or -1 with errno set
 int
 smtp_connect(host_item *host, int host_af, int port, uschar *interface,
   int timeout, BOOL keepalive, const uschar *dscp
-#ifdef EXPERIMENTAL_TPDA
-  , uschar * tpda_event
+#ifdef EXPERIMENTAL_EVENT
+  , uschar * event
 #endif
   )
 {
@@ -203,11 +203,11 @@ HDEBUG(D_transport|D_acl|D_v)
       host->address, port, interface);
   }


-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
/*XXX Called from both delivery and verify. Is that status observable? */
deliver_host_address = host->address;
deliver_host_port = port;
- if (tpda_raise_event(tpda_event, US"tcp:connect", NULL) == DEFER) return -1;
+ if (event_raise(event, US"tcp:connect", NULL) == DEFER) return -1;
#endif

 /* Create the socket */
diff --git a/src/src/structs.h b/src/src/structs.h
index 4f7862d..259d9af 100644
--- a/src/src/structs.h
+++ b/src/src/structs.h
@@ -187,8 +187,8 @@ typedef struct transport_instance {
   BOOL    log_fail_output;
   BOOL    log_defer_output;
   BOOL    retry_use_local_part;   /* Defaults true for local, false for remote */
-#ifdef EXPERIMENTAL_TPDA
-  uschar  *tpda_event_action;     /* String to expand on notable events */
+#ifdef EXPERIMENTAL_EVENT
+  uschar  *event_action;          /* String to expand on notable events */
 #endif
 } transport_instance;


diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c
index 5933193..20e11ca 100644
--- a/src/src/tls-gnu.c
+++ b/src/src/tls-gnu.c
@@ -47,9 +47,9 @@ require current GnuTLS, then we'll drop support for the ancient libraries).
# warning "GnuTLS library version too old; define DISABLE_OCSP in Makefile"
# define DISABLE_OCSP
#endif
-#if GNUTLS_VERSION_NUMBER < 0x020a00 && defined(EXPERIMENTAL_TPDA)
-# warning "GnuTLS library version too old; TPDA tls:cert event unsupported"
-# undef EXPERIMENTAL_TPDA
+#if GNUTLS_VERSION_NUMBER < 0x020a00 && defined(EXPERIMENTAL_EVENT)
+# warning "GnuTLS library version too old; tls:cert event unsupported"
+# undef EXPERIMENTAL_EVENT
#endif
#if GNUTLS_VERSION_NUMBER >= 0x030306
# define SUPPORT_CA_DIR
@@ -124,7 +124,7 @@ typedef struct exim_gnutls_state {
#ifdef EXPERIMENTAL_CERTNAMES
uschar *exp_tls_verify_cert_hostnames;
#endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
uschar *event_action;
#endif

@@ -145,7 +145,7 @@ static const exim_gnutls_state_st exim_gnutls_state_init = {
 #ifdef EXPERIMENTAL_CERTNAMES
                                             NULL,
 #endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
                                             NULL,
 #endif
   NULL,
@@ -1542,10 +1542,10 @@ return 0;
 #endif



-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
/*
We use this callback to get observability and detail-level control
-for an exim client TLS connection, raising a TPDA tls:cert event
+for an exim client TLS connection, raising a tls:cert event
for each cert in the chain presented by the server. Any event
can deny verification.

@@ -1574,7 +1574,7 @@ if (cert_list)
     }


   state->tlsp->peercert = crt;
-  if (tpda_raise_event(state->event_action,
+  if (event_raise(state->event_action,
           US"tls:cert", string_sprintf("%d", cert_list_size)) == DEFER)
     {
     log_write(0, LOG_MAIN,
@@ -1885,10 +1885,10 @@ if (request_ocsp)
   }
 #endif


-#ifdef EXPERIMENTAL_TPDA
-if (tb->tpda_event_action)
+#ifdef EXPERIMENTAL_EVENT
+if (tb->event_action)
   {
-  state->event_action = tb->tpda_event_action;
+  state->event_action = tb->event_action;
   gnutls_session_set_ptr(state->session, state);
   gnutls_certificate_set_verify_function(state->x509_cred, client_verify_cb);
   }
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 43ea8a0..13a3cd0 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -120,7 +120,7 @@ typedef struct tls_ext_ctx_cb {
 #ifdef EXPERIMENTAL_CERTNAMES
   uschar * verify_cert_hostnames;
 #endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
   uschar * event_action;
 #endif
 } tls_ext_ctx_cb;
@@ -322,11 +322,11 @@ else if (depth != 0)
       ERR_clear_error();
     }
 #endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
   if (tlsp == &tls_out && client_static_cbinfo->event_action)
     {
     tlsp->peercert = X509_dup(cert);
-    if (tpda_raise_event(client_static_cbinfo->event_action,
+    if (event_raise(client_static_cbinfo->event_action,
             US"tls:cert", string_sprintf("%d", depth)) == DEFER)
       {
       log_write(0, LOG_MAIN, "SSL verify denied by event-action: "
@@ -391,10 +391,10 @@ else
 # endif
 #endif    /*EXPERIMENTAL_CERTNAMES*/


-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
   if (tlsp == &tls_out)
     {
-    if (tpda_raise_event(client_static_cbinfo->event_action,
+    if (event_raise(client_static_cbinfo->event_action,
             US"tls:cert", US"0") == DEFER)
       {
       log_write(0, LOG_MAIN, "SSL verify denied by event-action: "
@@ -438,7 +438,7 @@ verify_callback_client_dane(int state, X509_STORE_CTX * x509ctx)
 {
 X509 * cert = X509_STORE_CTX_get_current_cert(x509ctx);
 static uschar txt[256];
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
 int depth = X509_STORE_CTX_get_error_depth(x509ctx);
 #endif


@@ -448,10 +448,10 @@ DEBUG(D_tls) debug_printf("verify_callback_client_dane: %s\n", txt);
tls_out.peerdn = txt;
tls_out.peercert = X509_dup(cert);

-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
   if (client_static_cbinfo->event_action)
     {
-    if (tpda_raise_event(client_static_cbinfo->event_action,
+    if (event_raise(client_static_cbinfo->event_action,
             US"tls:cert", string_sprintf("%d", depth)) == DEFER)
       {
       log_write(0, LOG_MAIN, "DANE verify denied by event-action: "
@@ -1140,7 +1140,7 @@ else
 cbinfo->dhparam = dhparam;
 cbinfo->server_cipher_list = NULL;
 cbinfo->host = host;
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
 cbinfo->event_action = NULL;
 #endif


@@ -1935,8 +1935,8 @@ if (request_ocsp)
}
#endif

-#ifdef EXPERIMENTAL_TPDA
-client_static_cbinfo->event_action = tb->tpda_event_action;
+#ifdef EXPERIMENTAL_EVENT
+client_static_cbinfo->event_action = tb->event_action;
#endif

 /* There doesn't seem to be a built-in timeout on connection. */
diff --git a/src/src/transport.c b/src/src/transport.c
index 15c30bf..e833894 100644
--- a/src/src/transport.c
+++ b/src/src/transport.c
@@ -66,6 +66,10 @@ optionlist optionlist_transports[] = {
                  (void *)offsetof(transport_instance, driver_name) },
   { "envelope_to_add",   opt_bool|opt_public,
                  (void *)(offsetof(transport_instance, envelope_to_add)) },
+#ifdef EXPERIMENTAL_EVENT
+  { "event_action",     opt_stringptr | opt_public,
+                 (void *)offsetof(transport_instance, event_action) },
+#endif
   { "group",             opt_expand_gid|opt_public,
                  (void *)offsetof(transport_instance, gid) },
   { "headers_add",      opt_stringptr|opt_public|opt_rep_str,
@@ -94,10 +98,6 @@ optionlist optionlist_transports[] = {
                  (void *)offsetof(transport_instance, shadow_condition) },
   { "shadow_transport", opt_stringptr|opt_public,
                  (void *)offsetof(transport_instance, shadow) },
-#ifdef EXPERIMENTAL_TPDA
-  { "tpda_event_action",opt_stringptr | opt_public,
-                 (void *)offsetof(transport_instance, tpda_event_action) },
-#endif
   { "transport_filter", opt_stringptr|opt_public,
                  (void *)offsetof(transport_instance, filter_command) },
   { "transport_filter_timeout", opt_time|opt_public,
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 6d34922..6886fd5 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -640,7 +640,7 @@ msglog_line(host_item * host, uschar * message)




-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
 /*************************************************
 *   Post-defer action                            *
 *************************************************/
@@ -656,9 +656,9 @@ Returns:   nothing
 */


static void
-tpda_deferred(address_item *addr, host_item *host)
+deferred_event_raise(address_item *addr, host_item *host)
{
-uschar * action = addr->transport->tpda_event_action;
+uschar * action = addr->transport->event_action;
uschar * save_domain;
uschar * save_local;

@@ -670,15 +670,15 @@ save_local = deliver_localpart;

 /*XXX would ip & port already be set up? */
 deliver_host_address = string_copy(host->address);
-deliver_host_port =    (host->port == PORT_NONE)? 25 : host->port;
-tpda_defer_errno =     addr->basic_errno;
+deliver_host_port =    host->port == PORT_NONE ? 25 : host->port;
+event_defer_errno =    addr->basic_errno;


 router_name =    addr->router->name;
 transport_name = addr->transport->name;
 deliver_domain = addr->domain;
 deliver_localpart = addr->local_part;


-(void) tpda_raise_event(action, US"msg:host:defer",
+(void) event_raise(action, US"msg:host:defer",
     addr->message
       ? addr->basic_errno > 0
     ? string_sprintf("%s: %s", addr->message, strerror(addr->basic_errno))
@@ -1356,8 +1356,8 @@ if (continue_hostname == NULL)
   inblock.sock = outblock.sock =
     smtp_connect(host, host_af, port, interface, ob->connect_timeout,
           ob->keepalive, ob->dscp
-#ifdef EXPERIMENTAL_TPDA
-          , tblock->tpda_event_action
+#ifdef EXPERIMENTAL_EVENT
+          , tblock->event_action
 #endif
         );


@@ -1413,8 +1413,8 @@ if (continue_hostname == NULL)
     if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2',
       ob->command_timeout)) goto RESPONSE_FAILED;


-#ifdef EXPERIMENTAL_TPDA
-    if (tpda_raise_event(tblock->tpda_event_action, US"smtp:connect", buffer)
+#ifdef EXPERIMENTAL_EVENT
+    if (event_raise(tblock->event_action, US"smtp:connect", buffer)
     == DEFER)
     {
     uschar *message = US"deferred by smtp:connect event expansion";
@@ -2218,7 +2218,7 @@ if (!ok) ok = TRUE; else
     /* Set up confirmation if needed - applies only to SMTP */


     if (
-#ifndef EXPERIMENTAL_TPDA
+#ifndef EXPERIMENTAL_EVENT
           (log_extra_selector & LX_smtp_confirmation) != 0 &&
 #endif
           !lmtp
@@ -2659,8 +2659,8 @@ case continue_more won't get set. */


(void)close(inblock.sock);

-#ifdef EXPERIMENTAL_TPDA
-(void) tpda_raise_event(tblock->tpda_event_action, US"tcp:close", NULL);
+#ifdef EXPERIMENTAL_EVENT
+(void) event_raise(tblock->event_action, US"tcp:close", NULL);
#endif

 continue_transport = NULL;
@@ -3370,9 +3370,9 @@ for (cutoff_retry = 0; expired &&
                          first_addr->basic_errno != ERRNO_TLSFAILURE)
         write_logs(first_addr, host);


-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
       if (rc == DEFER)
-        tpda_deferred(first_addr, host);
+        deferred_event_raise(first_addr, host);
 #endif


       /* If STARTTLS was accepted, but there was a failure in setting up the
@@ -3399,9 +3399,9 @@ for (cutoff_retry = 0; expired &&
           expanded_hosts != NULL, &message_defer, TRUE);
         if (rc == DEFER && first_addr->basic_errno != ERRNO_AUTHFAIL)
           write_logs(first_addr, host);
-# ifdef EXPERIMENTAL_TPDA
+# ifdef EXPERIMENTAL_EVENT
         if (rc == DEFER)
-          tpda_deferred(first_addr, host);
+          deferred_event_raise(first_addr, host);
 # endif
         }
 #endif    /*SUPPORT_TLS*/
diff --git a/src/src/verify.c b/src/src/verify.c
index db35aa5..dba0916 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -538,8 +538,8 @@ else


     inblock.sock = outblock.sock =
       smtp_connect(host, host_af, port, interface, callout_connect, TRUE, NULL
-#ifdef EXPERIMENTAL_TPDA
-    /*XXX tpda action? NULL for now. */
+#ifdef EXPERIMENTAL_EVENT
+    /*XXX event action? NULL for now. */
           , NULL
 #endif
           );
@@ -581,8 +581,8 @@ else
       if (!(done= smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout)))
         goto RESPONSE_FAILED;


-#ifdef EXPERIMENTAL_TPDA
-      if (tpda_raise_event(addr->transport->tpda_event_action,
+#ifdef EXPERIMENTAL_EVENT
+      if (event_raise(addr->transport->event_action,
                 US"smtp:connect", responsebuffer) == DEFER)
     {
     /* Logging?  Debug? */
@@ -708,8 +708,8 @@ else
          )
         {
         (void)close(inblock.sock);
-#ifdef EXPERIMENTAL_TPDA
-        (void) tpda_raise_event(addr->transport->tpda_event_action,
+#ifdef EXPERIMENTAL_EVENT
+        (void) event_raise(addr->transport->event_action,
                     US"tcp:close", NULL);
 #endif
         log_write(0, LOG_MAIN, "TLS session failure: delivering unencrypted "
@@ -1066,8 +1066,8 @@ else
       tls_close(FALSE, TRUE);
 #endif
       (void)close(inblock.sock);
-#ifdef EXPERIMENTAL_TPDA
-      (void) tpda_raise_event(addr->transport->tpda_event_action,
+#ifdef EXPERIMENTAL_EVENT
+      (void) event_raise(addr->transport->event_action,
                   US"tcp:close", NULL);
 #endif
       }
diff --git a/test/confs/5608 b/test/confs/5608
index 500c54b..da0f670 100644
--- a/test/confs/5608
+++ b/test/confs/5608
@@ -1,5 +1,5 @@
 # Exim test configuration 5608
-# OCSP stapling, client, tpda
+# OCSP stapling, client, events


SERVER =

@@ -55,7 +55,7 @@ check_data:
accept

 logger:
-  accept condition = ${if !eq {msg} {${listextract{1}{$tpda_event}}}}
+  accept condition = ${if !eq {msg} {${listextract{1}{$event_name}}}}
   warn    logwrite = client ocsp status: $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
@@ -101,7 +101,7 @@ send_to_server1:
   hosts_require_tls =    *
   hosts_request_ocsp =    :
   headers_add =            X-TLS-out: ocsp status $tls_out_ocsp
-  tpda_event_action =        ${acl {logger}}
+  event_action =        ${acl {logger}}


 # norequire: request stapling but do not verify
 send_to_server2:
@@ -113,7 +113,7 @@ send_to_server2:
   hosts_require_tls =    *
 # note no ocsp mention here
   headers_add =            X-TLS-out: ocsp status $tls_out_ocsp
-  tpda_event_action =        ${acl {logger}}
+  event_action =        ${acl {logger}}


 # (any other name): request and verify
 send_to_server3:
@@ -126,7 +126,7 @@ send_to_server3:
   hosts_require_tls =    *
   hosts_require_ocsp =    *
   headers_add =            X-TLS-out: ocsp status $tls_out_ocsp
-  tpda_event_action =        ${acl {logger}}
+  event_action =        ${acl {logger}}


 # (any other name): request and verify, ssl-on-connect
 send_to_server4:
@@ -140,7 +140,7 @@ send_to_server4:
   hosts_require_tls =  *
   hosts_require_ocsp = *
   headers_add =            X-TLS-out: ocsp status $tls_out_ocsp
-  tpda_event_action =        ${acl {logger}}
+  event_action =        ${acl {logger}}



# ----- Retry -----
diff --git a/test/confs/5658 b/test/confs/5658
index e4c346a..7ab2de6 100644
--- a/test/confs/5658
+++ b/test/confs/5658
@@ -1,5 +1,5 @@
# Exim test configuration 5658
-# OCSP stapling, client, tpda
+# OCSP stapling, client, events

SERVER =

@@ -52,7 +52,7 @@ check_data:
accept

 logger:
-  accept condition = ${if !eq {msg} {${listextract{1}{$tpda_event}}}}
+  accept condition = ${if !eq {msg} {${listextract{1}{$event_name}}}}
   warn    logwrite = client ocsp status: $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
@@ -100,7 +100,7 @@ send_to_server1:
   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
-  tpda_event_action =    ${acl {logger}}
+  event_action =    ${acl {logger}}


 send_to_server2:
   driver = smtp
@@ -113,7 +113,7 @@ send_to_server2:
   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
-  tpda_event_action =    ${acl {logger}}
+  event_action =    ${acl {logger}}


 send_to_server3:
   driver = smtp
@@ -128,7 +128,7 @@ send_to_server3:
   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
-  tpda_event_action =    ${acl {logger}}
+  event_action =    ${acl {logger}}


 send_to_server4:
   driver = smtp
@@ -144,7 +144,7 @@ send_to_server4:
   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
     (${listextract {${eval:$tls_out_ocsp+1}} \
         {notreq:notresp:vfynotdone:failed:verified}})
-  tpda_event_action =    ${acl {logger}}
+  event_action =    ${acl {logger}}



# ----- Retry -----
diff --git a/test/confs/5700 b/test/confs/5700
index 0e9fd1d..2df6341 100644
--- a/test/confs/5700
+++ b/test/confs/5700
@@ -13,7 +13,7 @@ gecos_name = CALLER_NAME
acl_smtp_rcpt = accept
acl_smtp_data = accept

-delivery_event_action = ${acl {logger}}
+event_action = ${acl {logger}}


# ----- ACL -----
@@ -21,9 +21,9 @@ delivery_event_action = ${acl {logger}}
begin acl

 ev_tcp:
-    accept condition = ${if eq {$tpda_event}{tcp:connect}}
+    accept condition = ${if eq {$event_name}{tcp:connect}}
        logwrite = . [$host_address]:$host_port
-    accept condition = ${if eq {$tpda_event}{tcp:close}}
+    accept condition = ${if eq {$event_name}{tcp:close}}
        logwrite = . [$sending_ip_address] -> \
             [$host_address]:$host_port
     accept
@@ -32,10 +32,10 @@ ev_smtp:
     accept
        logwrite = . [$sending_ip_address] -> \
             [$host_address]:$host_port
-       logwrite = . banner <$tpda_data>
+       logwrite = . banner <$event_data>


 ev_msg_fail:
-    accept condition = ${if eq {$tpda_event}{msg:fail:delivery}}
+    accept condition = ${if eq {$event_name}{msg:fail:delivery}}
        logwrite = . \
         refused by fdqn <$host> \
         local_part <$local_part> \
@@ -44,19 +44,19 @@ ev_msg_fail:
     accept logwrite = . \
         local_part <$local_part> \
         domain <$domain> \
-        reason <$tpda_data>
+        reason <$event_data>


 ev_msg:
-    accept condition = ${if eq {fail} {${listextract{2}{$tpda_event}}}}
+    accept condition = ${if eq {fail} {${listextract{2}{$event_name}}}}
        acl = ev_msg_fail


-    accept condition = ${if eq {$tpda_event}{msg:complete}}
+    accept condition = ${if eq {$event_name}{msg:complete}}
        logwrite = . finished: $message_exim_id


     accept condition = ${if !eq {$domain}{domain1}}
        logwrite = $this_expansion_will_fail


-    accept condition = ${if eq {$tpda_event}{msg:delivery}}
+    accept condition = ${if eq {$event_name}{msg:delivery}}
        logwrite = . \
         delivery \
         ip <$host_address> \
@@ -64,11 +64,11 @@ ev_msg:
         fqdn <$host> \
         local_part <$local_part> \
         domain <$domain> \
-        confirmation <$tpda_data> \
+        confirmation <$event_data> \
         router <$router_name> \
         transport <$transport_name>


-    accept condition = ${if eq {$tpda_event}{msg:host:defer}}
+    accept condition = ${if eq {$event_name}{msg:host:defer}}
        logwrite = . \
         deferral \
         ip <$host_address> \
@@ -76,18 +76,18 @@ ev_msg:
         fqdn <$host> \
         local_part <$local_part> \
         domain <$domain> \
-        errno <$tpda_defer_errno> \
-        errstr <$tpda_data> \
+        errno <$event_defer_errno> \
+        errstr <$event_data> \
         router <$router_name> \
         transport <$transport_name>


 logger:
-    warn   logwrite = event $tpda_event
-    accept condition = ${if eq {tcp} {${listextract{1}{$tpda_event}}}}
+    warn   logwrite = event $event_name
+    accept condition = ${if eq {tcp} {${listextract{1}{$event_name}}}}
        acl = ev_tcp
-    accept condition = ${if eq {smtp} {${listextract{1}{$tpda_event}}}}
+    accept condition = ${if eq {smtp} {${listextract{1}{$event_name}}}}
        acl = ev_smtp
-    accept condition = ${if eq {msg} {${listextract{1}{$tpda_event}}}}
+    accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
        acl = ev_msg



@@ -117,6 +117,6 @@ smtp:
port = PORT_S
command_timeout = 1s
final_timeout = 1s
- tpda_event_action = ${acl {logger}}
+ event_action = ${acl {logger}}

# End
diff --git a/test/confs/5750 b/test/confs/5750
index bcb03ac..8cfef31 100644
--- a/test/confs/5750
+++ b/test/confs/5750
@@ -34,7 +34,7 @@ tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server2.example.com/
begin acl

 ev_tls:
-  accept logwrite =  $tpda_event depth=$tpda_data \
+  accept logwrite =  $event_name depth=$event_data \
             <${certextract {subject} {$tls_out_peercert}}>
 #     message = noooo


@@ -58,9 +58,9 @@ ev_msg:
      logwrite =       ${certextract {crl_uri}    {$tls_out_peercert} {CRU <$value>}{(no CRU)}}


 logger:
-  accept condition = ${if eq {msg} {${listextract{1}{$tpda_event}}}}
-     acl = ev_msg $tpda_event $acl_arg2
-  accept condition = ${if eq {tls} {${listextract{1}{$tpda_event}}}}
+  accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
+     acl = ev_msg $event_name $acl_arg2
+  accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
      message =   ${acl {ev_tls}}
   accept


@@ -93,7 +93,7 @@ send_to_server:
{example.com/server1.example.com/ca_chain.pem}\
{example.net/server1.example.net/ca_chain.pem}}

- tpda_event_action = ${acl {logger} {$tpda_event} {$domain} }
+ event_action = ${acl {logger} {$event_name} {$domain} }

# ----- Retry -----

diff --git a/test/confs/5760 b/test/confs/5760
index c3b49d1..b8cab04 100644
--- a/test/confs/5760
+++ b/test/confs/5760
@@ -34,7 +34,7 @@ tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server2.example.com/
begin acl

 ev_tls:
-  accept logwrite =  $tpda_event depth=$tpda_data \
+  accept logwrite =  $event_name depth=$event_data \
             <${certextract {subject} {$tls_out_peercert}}>
 #     message = nooooo


@@ -58,9 +58,9 @@ ev_msg:
      logwrite =       ${certextract {crl_uri}    {$tls_out_peercert} {CRU <$value>}{(no CRU)}}


 logger:
-  accept condition = ${if eq {msg} {${listextract{1}{$tpda_event}}}}
-     acl =         ev_msg $tpda_event $acl_arg2
-  accept condition = ${if eq {tls} {${listextract{1}{$tpda_event}}}}
+  accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
+     acl =         ev_msg $event_name $acl_arg2
+  accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
      message =   ${acl {ev_tls}}
   accept


@@ -93,7 +93,7 @@ send_to_server:
{example.com/server1.example.com/ca_chain.pem}\
{example.net/server1.example.net/ca_chain.pem}}

- tpda_event_action = ${acl {logger} {$tpda_event} {$domain} }
+ event_action = ${acl {logger} {$event_name} {$domain} }

# ----- Retry -----

diff --git a/test/confs/5860 b/test/confs/5860
index 956a5dc..7d9c755 100644
--- a/test/confs/5860
+++ b/test/confs/5860
@@ -43,13 +43,13 @@ tls_privatekey = ${if eq {SERVER}{server} \
begin acl

 logger:
-  accept condition = ${if eq {tls} {${listextract{1}{$tpda_event}}}}
-     logwrite = $tpda_event depth = $tpda_data \
+  accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
+     logwrite = $event_name depth = $event_data \
             <${certextract {subject} {$tls_out_peercert}}>
 #  message = noooo


-  accept condition = ${if eq {msg} {${listextract{1}{$tpda_event}}}}
-     logwrite = $tpda_event dane=$tls_out_dane
+  accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
+     logwrite = $event_name dane=$tls_out_dane
   accept


 # ----- Routers -----
@@ -83,6 +83,6 @@ send_to_server:
                  {= {0}{$tls_out_tlsa_usage}} } \
                         {*}{}}


- tpda_event_action = ${acl {logger}}
+ event_action = ${acl {logger}}

# End
diff --git a/test/log/5700 b/test/log/5700
index c3fe649..6af2a90 100644
--- a/test/log/5700
+++ b/test/log/5700
@@ -25,7 +25,7 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@domain2 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 event msg:delivery
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand tpda_event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"

1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:complete
diff --git a/test/paniclog/5700 b/test/paniclog/5700
index dcb6969..4ed4279 100644
--- a/test/paniclog/5700
+++ b/test/paniclog/5700
@@ -1,2 +1,2 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand tpda_event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"

diff --git a/test/scripts/5608-OCSP-OpenSSL-TPDA/REQUIRES b/test/scripts/5608-OCSP-OpenSSL-TPDA/REQUIRES
index 492da8f..d4c3b49 100644
--- a/test/scripts/5608-OCSP-OpenSSL-TPDA/REQUIRES
+++ b/test/scripts/5608-OCSP-OpenSSL-TPDA/REQUIRES
@@ -1,4 +1,4 @@
support OpenSSL
support OCSP
-support Experimental_TPDA
+support Experimental_Event
running IPv4
diff --git a/test/scripts/5658-OCSP-GnuTLS-TPDA/REQUIRES b/test/scripts/5658-OCSP-GnuTLS-TPDA/REQUIRES
index 3798079..c06f369 100644
--- a/test/scripts/5658-OCSP-GnuTLS-TPDA/REQUIRES
+++ b/test/scripts/5658-OCSP-GnuTLS-TPDA/REQUIRES
@@ -1,4 +1,4 @@
support GnuTLS
support OCSP
-support Experimental_TPDA
+support Experimental_Event
running IPv4
diff --git a/test/scripts/5700-tpt-post-dlv-action/REQUIRES b/test/scripts/5700-tpt-post-dlv-action/REQUIRES
index 4444658..33cd625 100644
--- a/test/scripts/5700-tpt-post-dlv-action/REQUIRES
+++ b/test/scripts/5700-tpt-post-dlv-action/REQUIRES
@@ -1 +1 @@
-support Experimental_TPDA
+support Experimental_Event
diff --git a/test/scripts/5750-GnuTLS-TPDA/REQUIRES b/test/scripts/5750-GnuTLS-TPDA/REQUIRES
index af1eb46..66a85d7 100644
--- a/test/scripts/5750-GnuTLS-TPDA/REQUIRES
+++ b/test/scripts/5750-GnuTLS-TPDA/REQUIRES
@@ -1,2 +1,2 @@
-support Experimental_TPDA
+support Experimental_Event
support GnuTLS
diff --git a/test/scripts/5760-OpenSSL-TPDA/REQUIRES b/test/scripts/5760-OpenSSL-TPDA/REQUIRES
index 5b48920..d87b287 100644
--- a/test/scripts/5760-OpenSSL-TPDA/REQUIRES
+++ b/test/scripts/5760-OpenSSL-TPDA/REQUIRES
@@ -1,2 +1,2 @@
-support Experimental_TPDA
+support Experimental_Event
support OpenSSL
diff --git a/test/scripts/5860-DANE-OpenSSL-TPDA/REQUIRES b/test/scripts/5860-DANE-OpenSSL-TPDA/REQUIRES
index 7e51b4f..a80adaf 100644
--- a/test/scripts/5860-DANE-OpenSSL-TPDA/REQUIRES
+++ b/test/scripts/5860-DANE-OpenSSL-TPDA/REQUIRES
@@ -1,4 +1,4 @@
support Experimental_DANE
-support Experimental_TPDA
+support Experimental_EVENT
support OpenSSL
running IPv4
diff --git a/test/stderr/5700 b/test/stderr/5700
index dcb6969..4ed4279 100644
--- a/test/stderr/5700
+++ b/test/stderr/5700
@@ -1,2 +1,2 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand tpda_event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"