RFC 1985
Remote Message Queue Starting (ETRN)¶
The SMTP ETRN extension is used to request a remote MTA to start its delivery queue for the specified domain. If the application requests the use if the ETRN extension and the remote MTA does not list ETRN, libESMTP will use the event callback to notify the application.
-
smtp_etrn_node_t smtp_etrn_add_node(smtp_session_t session, int option, const char *domain)¶
create an ETRN node.
Parameters
smtp_session_t session
The session.
int option
The option character.
const char *domain
Request mail for this domain.
Description
Add an ETRN node to the SMTP session.
Return
An typedef smtp_etrn_node_t
or NULL
on failure.
-
int smtp_etrn_enumerate_nodes(smtp_session_t session, smtp_etrn_enumerate_nodecb_t cb, void *arg)¶
Call function for each ETRN node in session.
Parameters
smtp_session_t session
The session.
smtp_etrn_enumerate_nodecb_t cb
Callback function
void *arg
Argument (closure) passed to callback.
Description
Call the callback function once for each ETRN node in the SMTP session.
Return
Zero on failure, non-zero on success.
-
const smtp_status_t *smtp_etrn_node_status(smtp_etrn_node_t node)¶
Retrieve ETRN status.
Parameters
smtp_etrn_node_t node
An
smtp_etrn_node_t
returned by smtp_etrn_add_node()
Description
Retrieve the ETRN node success/failure status from a previous SMTP session. This includes SMTP status codes, RFC 2034 enhanced status codes, if available and text from the server describing the status.
Return
NULL
if no status information is available,
otherwise a pointer to the status information. The pointer remains valid
until the next call to libESMTP in the same thread.
-
void *smtp_etrn_set_application_data(smtp_etrn_node_t node, void *data)¶
Associate data with an ETRN node.
Parameters
smtp_etrn_node_t node
An
smtp_etrn_node_t
returned by smtp_etrn_add_node()void *data
Application data to set
Description
Associate application defined data with the opaque ETRN structure.
Only available when LIBESMTP_ENABLE_DEPRECATED_SYMBOLS
is defined.
Use smtp_etrn_set_application_data_release() instead.
Return
Previously set application data or NULL
.
-
void smtp_etrn_set_application_data_release(smtp_etrn_node_t node, void *data, void (*release)(void*))¶
Associate data with an ETRN node.
Parameters
smtp_etrn_node_t node
An
smtp_etrn_node_t
returned by smtp_etrn_add_node()void *data
Application data
void (*release) (void *)
function to free/unref data.
Description
Associate application data with the ETRN node. If release is non-NULL it is called to free or unreference data when changed or the session is destroyed.
-
void *smtp_etrn_get_application_data(smtp_etrn_node_t node)¶
Get data from an ETRN node.
Parameters
smtp_etrn_node_t node
An
smtp_etrn_node_t
returned by smtp_etrn_add_node()
Description
Retrieve application data from the opaque ETRN structure.
Return
Application data or NULL
.