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
-----------------
-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
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
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:
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}}', \
'${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:
tls:cert refuse verification
smtp:connect close connection
+No other use is made of the result string.
# 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).
#define EXPERIMENTAL_REDIS
#define EXPERIMENTAL_SPF
#define EXPERIMENTAL_SRS
-#define EXPERIMENTAL_TPDA
+#define EXPERIMENTAL_EVENT
/* For developers */
#define WANT_DEEPER_PRINTF_CHECKS
-#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
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;
}
}
}
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;
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);
deliver_domain = save_domain;
router_name = transport_name = NULL;
}
-#endif /*EXPERIMENTAL_TPDA*/
+#endif /*EXPERIMENTAL_EVENT*/
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
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;
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);
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;
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);
break;
}
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
if (process_recipients != RECIP_ACCEPT)
{
uschar * save_local = deliver_localpart;
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;
/* 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
}
#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");
{ "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 },
{ "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 },
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 *);
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
);
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 *);
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;
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
};
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 */
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 */
{ "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
{ "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 },
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
*/
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
)
{
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 */
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;
# 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
#ifdef EXPERIMENTAL_CERTNAMES
uschar *exp_tls_verify_cert_hostnames;
#endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
uschar *event_action;
#endif
#ifdef EXPERIMENTAL_CERTNAMES
NULL,
#endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
NULL,
#endif
NULL,
#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.
}
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,
}
#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);
}
#ifdef EXPERIMENTAL_CERTNAMES
uschar * verify_cert_hostnames;
#endif
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
uschar * event_action;
#endif
} tls_ext_ctx_cb;
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: "
# 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: "
{
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
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: "
cbinfo->dhparam = dhparam;
cbinfo->server_cipher_list = NULL;
cbinfo->host = host;
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
cbinfo->event_action = NULL;
#endif
}
#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. */
(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,
(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,
-#ifdef EXPERIMENTAL_TPDA
+#ifdef EXPERIMENTAL_EVENT
/*************************************************
* Post-defer action *
*************************************************/
*/
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;
/*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))
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
);
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";
/* 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
(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;
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
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*/
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
);
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? */
)
{
(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 "
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
}
# Exim test configuration 5608
-# OCSP stapling, client, tpda
+# OCSP stapling, client, events
SERVER =
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}})
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:
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:
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:
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 -----
# Exim test configuration 5658
-# OCSP stapling, client, tpda
+# OCSP stapling, client, events
SERVER =
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}})
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
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
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
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 -----
acl_smtp_rcpt = accept
acl_smtp_data = accept
-delivery_event_action = ${acl {logger}}
+event_action = ${acl {logger}}
# ----- ACL -----
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
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> \
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> \
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> \
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
port = PORT_S
command_timeout = 1s
final_timeout = 1s
- tpda_event_action = ${acl {logger}}
+ event_action = ${acl {logger}}
# End
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
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
{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 -----
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
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
{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 -----
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 -----
{= {0}{$tls_out_tlsa_usage}} } \
{*}{}}
- tpda_event_action = ${acl {logger}}
+ event_action = ${acl {logger}}
# End
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
-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"
support OpenSSL
support OCSP
-support Experimental_TPDA
+support Experimental_Event
running IPv4
support GnuTLS
support OCSP
-support Experimental_TPDA
+support Experimental_Event
running IPv4
-support Experimental_TPDA
+support Experimental_Event
-support Experimental_TPDA
+support Experimental_Event
support GnuTLS
-support Experimental_TPDA
+support Experimental_Event
support OpenSSL
support Experimental_DANE
-support Experimental_TPDA
+support Experimental_EVENT
support OpenSSL
running IPv4
-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"