# Email DNS Settings DNS / Email DNS Settings ## Create mail exchanger record - [GET /Email/add_mx](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/add_mx.md): This function creates a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation. When you disable the role, the system this function ## Update mail exchanger record - [GET /Email/change_mx](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/change_mx.md): This function creates a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation. When you disable the role, the system this function. ## Delete mail exchanger record - [GET /Email/delete_mx](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/delete_mx.md): This function deletes a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation. When you disable the DNS role, the system this function. ## Return mail exchanger records - [GET /Email/list_mxs](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/list_mxs.md): This function lists Mail Exchanger (MX) records. When you disable the role, the system this function. ## Apply DMARC records to domains. - [GET /EmailAuth/apply_dmarc](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/emailauth::apply_dmarc.md): This function applies a DMARC record to the specified domain(s) ## Remove domains' DKIM records - [GET /EmailAuth/disable_dkim](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/disable_dkim.md): This function removes the DomainKeys Identified Mail (DKIM) records on the DNS server for one or more domains. ## Enable domains' DKIM records - [GET /EmailAuth/enable_dkim](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/enable_dkim.md): This function enables DomainKeys Identified Mail (DKIM) records on the DNS server for one or more domains. If a DKIM record does exist on the server, this function will install a new DKIM record. ## Validate domains' DKIM private keys - [GET /EmailAuth/ensure_dkim_keys_exist](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/ensure_dkim_keys_exist.md): This function confirms the validity of a DomainKeys Identified Mail (DKIM) key for one or more domains. * If an existing DKIM key does meet the server's security requirements, the system replaces the existing DKIM key. * If no DKIM key exists, the system creates a new key for the domain. ## Return domains' DKIM private keys - [GET /EmailAuth/fetch_dkim_private_keys](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/fetch_dkim_private_keys.md): This function returns a domain's installed DKIM private key in Privacy-Enhanced Mail (PEM) format. We recommend that you protect your private key. If others obtain your private DKIM key, they could sign emails and impersonate you as a sender. ## Add domains' DKIM record keys - [GET /EmailAuth/install_dkim_private_keys](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/install_dkim_private_keys.md): This function installs existing keys for use in a DomainKeys Identified Mail (DKIM) record. This is useful if you do not want the system to generate keys for DKIM records. * This function does update the local DNS server's records. * If the local DNS server is authoritative for the domain's DNS records, use the UAPI function to update the local DNS server's DNS records. * We recommend that you use the UAPI and in a batch UAPI call. ## Add domains' SPF records - [GET /EmailAuth/install_spf_records](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/install_spf_records.md): This function installs a Sender Policy Framework (SPF) record for a domain on the DNS server. ## Remove DMARC record from domain(s) - [GET /EmailAuth/remove_dmarc](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/emailauth::remove_dmarc.md): This function removes the DMARC record for domains. ## Validate domains' DKIM records - [GET /EmailAuth/validate_current_dkims](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/validate_current_dkims.md): This function retrieves and checks the DomainKeys Identified Mail (DKIM) records for one or more domains. ## Validate domains' DMARC records - [GET /EmailAuth/validate_current_dmarcs](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/emailauth::validate_current_dmarcs.md): This function checks the validity of the current DMARC record for one or more domains. ## Validate domains' PTR records - [GET /EmailAuth/validate_current_ptrs](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/validate_current_ptrs.md): This function validates the pointer records (PTR) for IPv4 and IPv6 addresses that the account's domains send mail from. It retrieves the PTR records for each IP address and determines which of the domain's IP addresses send mail. It then validates the PTR records for each IP address and validates the A or AAAA records pointing to each domain. This function also ensures that at least one of that domain's A or AAAA records points back to the IP address. ## Validate domains' SPF records - [GET /EmailAuth/validate_current_spfs](https://api.docs.cpanel.net/specifications/cpanel.openapi/email-dns-settings/validate_current_spfs.md): This function retrieves the the Sender Policy Framework (SPF) records for one or more domains.