Skip to main content


register_smtp_client_state — Register a custom state in the SMTP client state machine


#include "dns_ds.h"

| int **register_smtp_client_state** ( | state, |   | |   | insert_after); |   |

smtp_state * <var class="pdparam">state</var>; int <var class="pdparam">insert_after</var>;


Register a custom state in the SMTP client state machine.

The SMTP client state machine is modular: external modules may register their own states to be called after a particular built-in or custom state.



The SMTP client state to register. All values of this structure (except for smtp_state.closure) are copied to a static variable so memory for state may be released after registering it. For more information on this data structure see “smtp_state”.


The state ID to insert the client state after. Passing a value of -1 places the SMTP state at the beginning, prior to the banner state.

Return Values

Returns an SMTP state ID computed by this function or -1 in the case of a failure.


It is only legal to call this function in the Scheduler thread.

See Also

Was this page helpful?