Integrating Cloudflare with Xeams To Programmatically Modify DNS Records
Many features in Xeams require modifications to your DNS server. Integrating Cloudflare with Xeams makes such modifications a
breeze. The following features in Xeams require TXT records in a DNS server:
- SPF
- DKIM
- DMARC
- MTA-STS
- Let's Encrypt - when using DNS for the challenge
Note that this feature is applicable if you have one or more domains using the DNS server provided by Cloudflare.
Benefits
Consider the following scenario as an example:
- You have a domain
example.com
that uses Cloudflare's DNS server.
- You want Xeams to create a new DKIM keys. You go to Filter Management/DKIM and add
example.com
as your domain.
- Xeams creates a public/private key in the background and now asks you to paste your public key in your DNS server. Normally, you would have to
copy/paste these values into the DNS server yourselves. However, once Cloudflare is integrated with Xeams, this step is just a click away.
Steps To Integrate
- Log in to your Xeams console as an administrator and click Tools/DNS Integration
- Select Cloudflare from the Available Providers and click Add Integration
- Open another tab or browser window
- Log in to your Cloudflare dashboard
- Click Account Home from the upper right-hand corner, as shown below.
- Select your desired domain.
- Click Get your API token from the links on the right, as shown below.
- Create Create Token
- Select the Edit zone DNS Template
- Select All zones from an account, as shown below.
- Finally, create a token.
- Switch back to the tab for Xeams and paste the newly created API Token
Handled Domains
Xeams pulls a list of domains that are handled by Cloudflare and matches them with the domains that are configured in Xeams. For example,
if you have 5 domains in Xeams but only 3 are handled by Cloudflare, you will not be able to modify records for the other two domains.
If you add another domain in Xeams at a later time, click the Refresh domain list button to recreate this mapping as shown below.