add_mx_record

Function add_mx_record 

Source
pub async fn add_mx_record(
    zone_name: &str,
    name: &str,
    priority: i32,
    mail_server: &str,
    ttl: Option<i32>,
    server: &str,
    key_data: &RndcKeyData,
) -> Result<()>
Expand description

Add an MX record using dynamic DNS update (RFC 2136) with RRset synchronization.

If the existing RRset differs from the desired state, the entire MX RRset for the name is deleted and recreated so stale rdata (e.g. an old mail server) never lingers.

ยงErrors

Returns an error if the DNS update fails or the server rejects it.