thunderbird_accounts.mail.dkim

Functions

build_customer_dkim_cname_records(domain_name)

Builds dkim CNAME dns records for a given domain name.

build_hosted_dkim_txt_record_names(domain_name)

Builds hosted DKIM TXT record names for a given domain name.

build_hosted_dkim_txt_records(domain_name, ...)

Builds dkim TXT dns records for a given domain name.

delete_hosted_dkim_txt_records(domain_name)

Deletes hosted DKIM TXT records for a given domain name.

dkim_signatures_to_dns_records(domain_name, ...)

Builds a dkim TXT dns record with the given dkim signatures.

hosted_dkim_record_name(selector, domain_name)

Returns a normalized dkim record name.

publish_hosted_dkim_txt_records(hosted_records)

Publishes hosted DKIM TXT records.

Classes

CloudflareDNSClient([api_token, zone_id, ...])

Cloudflare DNS Client Handles basic DNS operations against Cloudflare's API.

class thunderbird_accounts.mail.dkim.CloudflareDNSClient(api_token: str | None = None, zone_id: str | None = None, ttl: int | None = None, client=None)[source]

Bases: object

Cloudflare DNS Client Handles basic DNS operations against Cloudflare’s API.

Note: If you do not have the settings: HOSTED_DKIM_CLOUDFLARE_ZONE_ID or HOSTED_DKIM_CLOUDFLARE_API_TOKEN set then you must past zone_id and/or api_token respectively.

__init__(api_token: str | None = None, zone_id: str | None = None, ttl: int | None = None, client=None)[source]
thunderbird_accounts.mail.dkim.hosted_dkim_record_name(selector: str, domain_name: str, hosted_domain: str | None = None) str[source]

Returns a normalized dkim record name. If hosted domain is not specified it falls back on settings.HOSTED_DKIM_DOMAIN

thunderbird_accounts.mail.dkim.build_customer_dkim_cname_records(domain_name: str, hosted_domain: str | None = None) list[dict[str, str]][source]

Builds dkim CNAME dns records for a given domain name. If hosted domain is not specified it falls back on settings.HOSTED_DKIM_DOMAIN

thunderbird_accounts.mail.dkim.build_hosted_dkim_txt_record_names(domain_name: str, hosted_domain: str | None = None) list[str][source]

Builds hosted DKIM TXT record names for a given domain name. If hosted domain is not specified it falls back on settings.HOSTED_DKIM_DOMAIN

thunderbird_accounts.mail.dkim.build_hosted_dkim_txt_records(domain_name: str, dkim_dns_records: list[dict]) list[dict[str, str]][source]

Builds dkim TXT dns records for a given domain name. If hosted domain is not specified it falls back on settings.HOSTED_DKIM_DOMAIN

thunderbird_accounts.mail.dkim.dkim_signatures_to_dns_records(domain_name: str, signatures: list[dict]) list[dict[str, str]][source]

Builds a dkim TXT dns record with the given dkim signatures.

Raises:

RuntimeError – On an invalid public key or dkim signature

thunderbird_accounts.mail.dkim.publish_hosted_dkim_txt_records(hosted_records: list[dict[str, str]], dns_client=None) list[dict[str, str]][source]

Publishes hosted DKIM TXT records. If dns_client is not specified it falls back on CloudflareDNSClient

thunderbird_accounts.mail.dkim.delete_hosted_dkim_txt_records(domain_name: str, dns_client=None) list[dict[str, str | list[str]]][source]

Deletes hosted DKIM TXT records for a given domain name. If dns_client is not specified it falls back on CloudflareDNSClient