Skip to main content

Software managing certificate, dkim and domain updates automagically.

Project description

Crypto Domain Manager

Cryptographic extensions for spam prevention and security should use periodically changing keys. Crypto Domain Manager automates all the steps.

This tool handles all dynamic (and static) domain administration and management work:

  • It renews the certicate(s) using the dehydrated (letsencrypt) plugin.
  • It generates the TLSA records and publishes it in DNS.
  • It generates the DKIM keys using the rspamd plugin and publishes it in DNS.
  • It retrieves and updates IPv4 and IPv6 entries with automatic IP lookup. (+ fixed IPs)
  • It handles also: DMARC, SPF, SRV, CAA, ADSP.
  • CAA can be set to "auto" to retrieve CA from cert configuration
  • Records can be added or set (means overwrite existing).
  • Wildcard and default handling implemented.
  • That means coexitence with other handlers allowed.

Look at example.conf

  • Multiple Configfiles with priority allowed
  • Specify content of config file content as argument

Idea behind

Updating keys, certifcates and other needs 3 steps to prevent gaps in availabillity:

  1. Prepare: Create certificates, keys etc. and publish corresponding records to DNS.
  2. Rollover: Apply new certificates and keys, because now negative cache TTL on DNS is reached.
  3. Cleanup: Delete all no more needed stuff from disk and DNS.

Needed Plugins and Dependencies

  • dnsuptools: to interface with DNS API -- updating DNS entries
  • dehydrated: to get new certificate (included with cryptdomainmgr)
  • rspamd: to create (and use) DKIM keys

Current compatibility

  • Domain:
  • Certificate:
  • DKIM: rspamd
  • Service: systemd


These libraries are needed for pycurl used by dnsuptools for automatic ip retrieving:

apt install -y libcurl4-openssl-dev libssl-dev

This comman is used by dehydrated to communicate with letsencrypt for certificate renewal:

apt install -y curl

For DKIM we need rspamd:

apt install -y lsb-release wget # optional
CODENAME=`lsb_release -c -s`
wget -O- | apt-key add -
echo "deb [arch=amd64] $CODENAME main" > /etc/apt/sources.list.d/rspamd.list
echo "deb-src [arch=amd64] $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list
apt update
apt install -y rspamd

Now install the cryptdomainmgr. This pulls all need dependencies.

python2 -m pip install cryptdomainmgr

Feel free to try python3, but inwx client doesn't support it.

python3 -m pip install cryptdomainmgr



  • automated tests and deployment (continuous integration)
  • nsupdate
  • ARC key renewal
  • WPIA integration
  • deb package
  • DNSSEC key renewal
  • opendkim support
  • service reload via init.d
  • TXT record (may collide with SPF and other TXT based records)
  • multi server support for one domain: TLSA delete by timeout
  • contrain minimum renewal/phase time interval
  • database backend
  • monitoring
  • run as service
  • PowerDNS support


Stefan Helmert all work on this projekt

Want to support the project?


GRC: Rzsny83yz7ReKd9k9cF4L5T4B1VB8GzzaT


ETH: 0xA6a71817CC4E00B0646852401e9C5Cab024946d2

Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cryptdomainmgr, version 0.0.22
Filename, size File type Python version Upload date Hashes
Filename, size cryptdomainmgr-0.0.22-py3-none-any.whl (56.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cryptdomainmgr-0.0.22.tar.gz (39.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page