The email assistant computes the records a zone needs for the chosen mailbox and sending providers (one merged SPF, MX, DKIM, DMARC) and checks what the public DNS shows. Nothing is applied by these endpoints; apply a plan with Batch records.
Lists the provider templates of the email assistant, mailbox (mailbox, e.g. Google Workspace, Microsoft 365, Zoho Mail, Proton Mail, Fastmail), sending (sending, e.g. Amazon SES, Resend, Mailgun, SendGrid, Brevo) and other, with the parameters each one asks for (defaults already computed for the zone).
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.listEmailProviders({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d"
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.list_email_providers(zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d")
Computes the email records the zone needs for the chosen providers, compared with its current records (the public DNS for an external zone): one SPF record merging the providers' mechanisms with the existing ones (keeping the existing ~all/-all), the MX records of the mailbox provider, the DKIM keys pasted by the user (validated), verification records, sending subdomains and DMARC (p=none by default). It also counts the DNS lookups of the resulting SPF record (more than 10 is an error).
Nothing is applied. Problems are listed in issues (errors leave batch null). Send batch as is to Batch records, first with dry_run=1. In external zones applicable is false and the actions are manual.
Checks the mail records of the zone on public resolvers, MX present and consistent, a single SPF record and its DNS lookups (at most 10 including nested includes and redirects), DKIM keys, DMARC, proxied mail names, CNAME conflicts and, in delegated zones, whether the world sees the zone's records. Each check is ok, warn, fail or info with a stable code and its params. The result is cached for 60 seconds.
Required role:readonly or higher. refresh=true needs tech.
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.checkEmail({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d"
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.check_email(zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d")