smtp_should_session_shutdown

March 26, 2020

Name

smtp_should_session_shutdown — Determine whether an SMTP session should be shut down

Synopsis

#include "hooks/core/smtp_should_session_shutdown.h"

| int **core_smtp_should_session_shutdown** ( | closure, |   |
|   | dc); |   |

void * <var class="pdparam">closure</var>;
delivery_construct * <var class="pdparam">dc</var>;

Description

The smtp_should_session_shutdown hook allows modules to apply logic to determine whether an SMTP session should be shut down. This hook is called after a successful SMTP delivery and provides an alternate mechanism for terminating the session (alternate to exceeding max_deliveries_per_connection). This hook can also terminate a session after a failed SMTP delivery attempt.

Parameters

closure

A pointer to the closure.

dc

The delivery_construct struct. See “delivery_construct”.

Return Values

EC_HOOK_RETVAL is returned. For more information see “Hooking API”.

Threading

This hook will be invoked in the Scheduler thread.

See Also

“delivery_construct”