Skip to main content

Name

pre_read_smtp

Synopsis

#include "hooks/core/pre_read_smtp.h"

| int **pre_read_smtp** ( | closure, |   | |   | dc, |   | |   | expected, |   | |   | newstate, |   | |   | now, |   | |   | mask); |   |

void * <var class="pdparam">closure</var>; delivery_construct * <var class="pdparam">dc</var>; int <var class="pdparam">expected</var>; int <var class="pdparam">newstate</var>; struct timeval * <var class="pdparam">now</var>; int * <var class="pdparam">mask</var>;

| int **has_core_pre_read_smtp_hook** ( | ); |   |

| void **register_core_pre_read_smtp_hook_first** ( | hook, |   | |   | closure); |   |

ec_hook_core_pre_read_smtp_func_t <var class="pdparam">hook</var>; void *<var class="pdparam">closure</var>;

| void **register_core_pre_read_smtp_hook_last** ( | hook, |   | |   | closure); |   |

ec_hook_core_pre_read_smtp_func_t <var class="pdparam">hook</var>; void *<var class="pdparam">closure</var>;

| int **call_core_pre_read_smtp_hook** ( | dc, |   | |   | expected, |   | |   | newstate, |   | |   | now, |   | |   | mask); |   |

delivery_construct * <var class="pdparam">dc</var>; int <var class="pdparam">expected</var>; int <var class="pdparam">newstate</var>; struct timeval * <var class="pdparam">now</var>; int * <var class="pdparam">mask</var>;

Description

The pre_read_smtp hook is invoked immediately before data is read from the the remote server during outbound connections. The subsequent read operation is not guaranteed to return a complete SMTP response.

dc holds all details regarding the current SMTP connection. expected represents the expected SMTP response code (e.g. 250). newstate hold the new SMTP state machine state should the read complete and match the expected response code. now is the current scheduler time. *mask holds the event mask that should be used to trigger the next read. Under most circumstances, values past by reference should not be altered. Those arguments that are passed by reference are done so to mirror the parent function's API.

Was this page helpful?