Table of Contents
Introduction
Why authentication matters for FluentSMTP
Most email deliverability problems aren’t your copy—they’re missing DNS records. If you’re on FluentSMTP, SPF and DKIM are the minimum to keep Gmail and Outlook from binning your messages, and this is the fastest way to set them up without wasting an afternoon.
This matters for business communications, transactional emails, and marketing campaigns. With authenticated domains, you gain better inbox visibility and trust from recipients.
What SPF and DKIM do for deliverability and trust
SPF designates which servers are allowed to send on your domain’s behalf and helps receiving systems reject unauthorized senders.
DKIM adds a cryptographic signature to each message, preserving content integrity in transit and verifying the message was not altered after sending.
Together with DMARC, SPF and DKIM form a layered defense that improves inbox placement and reduces phishing risk.
- Improve inbox delivery and reduce spam flags
- Protect your brand against domain spoofing
- Provide verifiable proof of sending sources to mail providers

Prepare Your Domain for SPF and DKIM
Identify the authoritative sending sources
List every service that sends mail for your domain. Include FluentSMTP, your web host, CRM systems, and third party providers. Each source must be allowed in SPF and may require DKIM signing.
Focus on sources you actually use for transactional and marketing messages. Avoid broad server ranges that invite spoofing. A precise scope keeps DNS records manageable and reduces false positives.
- FluentSMTP as the primary outbound sender
- Your web hosting mail server if used for site generated mail
- External services like Google Workspace, Mailgun, or Amazon SES if used
- Forwarding services that rewrite mail paths
Gather required DNS access and records
Access to modify DNS records is essential. This may be through your domain registrar, hosting panel, or a dedicated DNS provider. Ensure you have admin rights to add and update TXT and CNAME records.
Prepare identifiers for SPF and DKIM. Note the sending sources for SPF and a DKIM selector name with the public key published as a TXT record.
- DNS provider login credentials
- Current SPF baseline if present
- Domain to protect and subdomains used for mail
- Planned DKIM selector name
Create the SPF Record
Determine SPF scope and include mechanisms
List all approved senders including FluentSMTP, your web host, and third party services. Define the scope clearly to avoid broad permissions that invite spoofing.
Build the SPF string with precise mechanisms. Use the a and mx qualifiers for owned servers, plus includes for external services. End with ~all or -all to indicate policy strictness.
- Identify primary sending sources like FluentSMTP and your hosting mail server
- Include trusted external providers with their official SPF include statements
- Decide on the final qualifier to control unauthorized mail
Publish the SPF TXT record in DNS
Open your domain’s DNS management console. Add a TXT record at the root with the SPF policy you crafted. The value must begin with v=spf1 and include approved mechanisms.
Ensure there are no conflicting SPF records. If one exists, consolidate into a single record to avoid validation failures.
- Root domain for the SPF record
- Exact includes and mechanisms without syntax errors
- TTL set to reflect updates
Configure DKIM Signing
Generate DKIM keys and selector
Create a DKIM key pair and a selector name. The selector identifies the key in DNS and during rotation. Use a short, memorable label with a date or version. Keep private keys on your server and publish only the public key in DNS.
FluentSMTP requires a private signing key on the sending server. The key should be at least 1024 bits, with 2048 bits preferred. Record the selector with the key for renewal or rotation.
- Choose a clear selector name, for example, flsmtp2026
- Generate a 2048-bit RSA key pair
- Store the private key securely on the FluentSMTP server
Publish the DKIM public key in DNS and enable signing in FluentSMTP
Publish the public key as a TXT record under the DKIM subdomain that combines your selector and domain. The record name is selector._domainkey.yourdomain.com and the value contains the v=DKIM1; k=rsa; p= portion.
In FluentSMTP, enable DKIM signing and specify the selector and domain. Verify outgoing messages carry the DKIM signature and align with the From domain.
- TXT record name: flsmtp2026._domainkey.yourdomain.com
- TXT record value includes the public key data
- Enable DKIM signing in FluentSMTP using the same selector

Align Return-Path and From Addresses
Ensure consistent envelope and header domains
Align the Return-Path with the From address to reduce filter confusion and improve deliverability. Use the same domain for both if it’s authorized in your SPF record.
FluentSMTP should sign messages so the DKIM header matches the From domain. When they align, inbox providers trust the message more and avoid spoofing flags.
Avoid mismatched domains that trigger failures
Mismatches between Return-Path and From can cause authentication failures or spam flags. Plan your domain setup before sending campaigns.
Use a single primary domain for transactional emails and subdomains for testing if needed. For example, mail.yourdomain.com as the Return-Path and yourdomain.com as the From address. Ensure both are covered by SPF and DKIM.
- Match the envelope domain with the SPF domain
- Use a consistent DKIM signing domain for all outbound messages
- Avoid forwarding paths that rewrite the Return-Path without SPF updates
Test and Verify SPF and DKIM
Use online checks to confirm DNS records
Run quick DNS Lookups to confirm SPF and DKIM are published correctly. Use reputable tools to verify syntax, propagation, and integrity. Ensure both records pass and there are no conflicting entries.
- SPF appears as a TXT at your root with v=spf1 and authorized mechanisms
- DKIM shows a TXT under selector._domainkey.yourdomain.com with a proper p= value
- DNS propagation is complete for major resolvers
Send test emails and review authentication results
Send sample messages through FluentSMTP to multiple inbox providers. Check headers to verify SPF and DKIM pass, and ensure Return-Path and From domains align.
- Verify SPF pass across Gmail, Yahoo, and others
- Confirm DKIM sign and alignment in the header from the signing domain
- Document failures and identify causes such as DNS propagation or selector mismatch
| Check | What to look for | Action if failed |
|---|---|---|
| SPF verification | Pass on major providers | Update SPF and re-publish TXT |
| DKIM verification | Signature present and aligned | Reconfigure signing or selector |
| Header alignment | From domain matches signing domain | Adjust envelope or domain policy |
Tune and Monitor DMARC (Optional but Recommended)
Publish a DMARC policy to protect your domain
DMARC adds reporting and enforcement on top of SPF and DKIM. It tells receivers what to do if authentication fails and helps you monitor abuse.
Start with a relaxed policy to collect data without blocking legitimate mail. A common setup uses p=none with a rua address for aggregate reports.
- Policy: p=none to begin
- Aggregate reports: rua=mailto:you@example.com
- Alignment: ensure SPF and DKIM align with the From domain
Review reports to detect and respond to issues
DMARC reports show who sends on your behalf and whether authentication passes. Regular review helps catch misconfigurations or unauthorized use.
Set a cadence for analysis and action. Use the reports to spot impersonation, forwarding issues, or gaps in SPF/DKIM.
- Identify unauthorized senders and block or configure them
- Detect domains lacking DKIM signing or with mismatched SPF sources
- Gradually tighten policy to ensure only authorized sources can deliver
| DMARC Outcome | What it means | Recommended Next Step |
|---|---|---|
| p=none with rua | Monitoring only | Review and adjust SPF/DKIM as needed |
| p=quarantine | Potentially risky mail flagged | Limit sources and enforce alignment |
| p=reject | High protection | Ensure all legitimate senders are covered |
FAQ
What if SPF fails after changes?
Recheck the SPF record syntax and the included sources. Ensure the TXT record is published at the root domain and that recent DNS changes have propagated. If failures persist, test with a narrow set of sending sources and gradually broaden coverage.
- Verify that you did not exceed the 10 DNS lookup limit
- Confirm the authoritative mail sources are included
- Check for syntax errors like missing mechanisms or incorrect modifiers
Can DKIM fail even with proper keys?
Yes. DKIM can fail if the selector used by FluentSMTP does not match the published DNS key. It can also fail from incorrect signing domains or if the message is altered in transit after signing.
- Ensure the selector matches the DNS TXT entry under selector._domainkey.domain
- Verify the signing domain aligns with the From domain
- Confirm no alterations occur after signing, such as through forwarding
How often should records be refreshed?
Review records whenever you change sending sources, switch hosting, or alter DNS providers. Regular checks after major updates help catch propagation delays and misconfigurations early.
- Plan a quarterly quick verification if operations are steady
- Run a full review after adding new mail services
- Monitor DMARC reports for unexpected activity and adjust as needed
Conclusion
Recap of the seven steps
We covered the core path to solid email authentication with FluentSMTP. You start by preparing your domain, then create an SPF record that clearly lists authorized senders. Next, you enable DKIM signing and publish the public key with a selector. Align the Return-Path and From addresses to ensure envelope and header domains match. Verify SPF and DKIM with checks and tests, and finally consider DMARC to add policy and reporting for ongoing protection.
Each step builds trust with mail providers and improves inbox deliverability. The goal is to create a consistent, verifiable identity for your domain when FluentSMTP sends messages.
Best practices for ongoing email authentication
- Regularly review DNS records after changes to hosting, DNS providers, or sending sources
- Keep selectors and keys up to date and rotate DKIM keys as part of a security hygiene routine
- Monitor DMARC reports to detect unauthorized usage and adjust policies accordingly
- Maintain alignment across SPF, DKIM, and From domains to prevent header failures
- Document changes and propagate DNS updates to avoid propagation delays
| Practice | Why it matters | Action |
|---|---|---|
| DNS hygiene | Reduces misconfigurations | Schedule quarterly checks |
| Key rotation | Improves security | Rotate DKIM keys every 12 to 24 months |
| Policy stance | Controls delivered mail | Start with p=none and move to quarantine or reject as controls firm |