Name
dns_get_MXs
Synopsis
#include "hooks/core/dns_get_MXs.h"
| int **dns_get_MXs** ( | closure, | |
| | domain); | |
void * <var class="pdparam">closure</var>;
const char * <var class="pdparam">domain</var>;
| int **has_core_dns_get_MXs_hook** ( | ); | |
| void **register_core_dns_get_MXs_hook_first** ( | hook, | |
| | closure); | |
ec_hook_core_dns_get_MXs_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;
| void **register_core_dns_get_MXs_hook_last** ( | hook, | |
| | closure); | |
ec_hook_core_dns_get_MXs_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;
| int **call_core_dns_get_MXs_hook** ( | domain); | |
Description
The dns_get_MXs command requests the name resolution subsystem to resolve the provided domain name to a set of mail exchanges. Upon successful resolution, the domain's mx list should be registered with the system (from the main thread) by calling dns_add_domain() and dns_domain_add_mx(). Afterwards, lookuptable_flushdomain() and mail_queue_maintain_domain() should be called on the resulting domain_record to initiate delivery. In case of failure, dns_add_mx_broken can be used to add an unrouteble domain container; it calls the flush and maintain functions, so doing so manually is unnecessary.