Skip to main content

Name

log_rejection — Register a function with this hook that will be called whenever a logging event due to message rejection occurs

Synopsis

#include "hooks/core/log_rejection.h"

| void **core_log_rejection** ( | closure, |   | |   | now, |   | |   | ac, |   | |   | ctx, |   | |   | phase, |   | |   | format, |   | |   | args); |   |

void * <var class="pdparam">closure</var>; struct timeval * <var class="pdparam">now</var>; accept_construct * <var class="pdparam">ac</var>; validate_context * <var class="pdparam">ctx</var>; int <var class="pdparam">phase</var>; const char * <var class="pdparam">format</var>; va_list <var class="pdparam">args</var>;

Description

Register a function with this hook that will be called whenever a logging event due to message rejection occurs. This hook has a signature that closely mirrors the signature defined for the log_rejection callback in a logging_infrastructure_1 struct. For documentation of this data structure see “logging_infrastructure_1”.

Parameters

closure

A pointer to the closure function.

now

A timeval struct.

ac

The accept_construct struct. For documentation of this data structure see “accept_construct”

ctx

The validate_context struct. For documentation of this data structure see “validate_context”

phase

The phase in which the rejection occurred. Values will be one of:

MC_STATE_START, MC_STATE_START_RESPONSE, MC_STATE_EHLO, MC_STATE_EHLO_RESPONSE, 
MC_STATE_MAILFROM, MC_STATE_MAILFROM_RESPONSE, MC_STATE_RCPTTO, MC_STATE_RCPTTO_RESPONSE,
MC_STATE_DATA, MC_STATE_BODY, MC_STATE_BODY_RESPONSE, MC_STATE_ASYNC_BODY_RESPONSE, 
MC_STATE_OK, MC_STATE_RELAYING_DENIED, MC_STATE_EXTENSION_1, MC_STATE_EXTENSION_2,
MC_STATE_EXTENSION_3, MC_STATE_EXTENSION_4, MC_STATE_CONCURRENCY_LIMIT, 
MC_STATE_RCPTTO_LIST_RESPONSE, MC_STATE_RCPTTO_LIST_FINAL_RESPONSE, MC_STATE_SETUP,
MC_STATE_MCMT_FIXUP, MC_STATE_COUNT
format

The format for the rejection string that will be returned to the client.

args

The arguments for the format string.

Return Values

This hook returns void.

Threading

This hook will be called in any thread.

See Also

Was this page helpful?