Table of Contents
Introduction
Overview of email authentication
Emails without SPF and DKIM don’t just get spam-filtered—they get rejected outright by most providers. If you’re self-hosting anything (n8n on a UK VPS, a mail server, whatever), skipping authentication setup will cost you more in troubleshooting than it saves. Here’s how to configure both in five minutes.
Pairing these with DMARC helps mitigate spoofing and phishing while guiding handling policies for messages that fail authentication. Correct implementation supports inbox delivery rather than junk placement.
Why SPF and DKIM matter for FluentSMTP
For FluentSMTP users, proper SPF and DKIM setup protects your brand and improves deliverability. A misconfiguration can trigger security filters and block legitimate mail during peak campaigns.
- SPF defines which servers may send on behalf of your domain, preventing unauthorized senders and reducing misuse of your address.
- DKIM adds a verifiable signature that confirms message integrity from submission to receipt.
- DMARC alignment ties SPF and DKIM results together and provides actionable reporting for you.

1. Understand SPF and DKIM in FluentSMTP Context
What SPF does for FluentSMTP
SPF specifies which mail servers are authorized to send on behalf of your domain. In FluentSMTP, a correctly configured SPF record ensures outbound messages pass basic server checks, reducing the chance legitimate emails are treated as spoofed.
- Authorizes FluentSMTP servers to send for your domain, helping prevent policy-based bounce issues.
- Helps recipients distinguish permitted senders from unauthorized sources, reducing false positives for your brand.
- Supports deliverability alongside DKIM and DMARC, particularly for time‑sensitive notifications.
What DKIM does for FluentSMTP
DKIM adds a cryptographic signature to outbound messages. For FluentSMTP, recipients verify message integrity and origin via the DNS public key, providing a trust layer beyond SPF.
- Attaches a domain tied signature visible in email headers as a DKIM-Signature field.
- Helps detect tampering during transit by enabling content verification.
- Verifies signatures using DNS published public keys and supports key rotation to mitigate exposure.
2. Create and Publish the SPF Record
Construct the SPF string for FluentSMTP
Start with the core idea that only approved sending servers may use your domain. The SPF string is a DNS TXT record listing these servers and defining the policy. For FluentSMTP, include the FluentSMTP sending domains or IPs you rely on, plus a mechanism like ~all or -all to set the level of strictness.
- Include FluentSMTP servers you use to send mail. For example, if you send via smtp.yourdomain.com and smtp.fluentsmtp.com, list both.
- Add any third party services that send on your behalf if applicable, such as marketing platforms or CRM email relays.
- Choose an end qualifier that matches your tolerance for misconfigurations, such as ~all for soft failure during rollout or -all for strict enforcement.
Publish and verify SPF propagation
Publish the SPF TXT record in your domain’s DNS. After publishing, allow time for DNS propagation, which can vary by provider. Verify using DNS query tools to ensure the record appears as expected.
- Place the SPF record at the root domain, typically as a TXT record. Avoid nested subdomains unless you have a subdomain policy.
- Confirm the record value includes all authorized senders for FluentSMTP, including any fallbacks you plan to use.
- Check for syntax errors or multiple SPF records that could cause failures. Use a parser or a trusted tool to validate syntax and DNS propagation status.
3. Generate DKIM Keys for FluentSMTP
Generate DKIM selector and keys
Create a DKIM selector that identifies the key pair in DNS and fits your domain setup. Use a memorable, scoped name such as default or fluentdkim. Generate a private key to sign outbound messages and a corresponding public key to publish in DNS. The private key signs the message, while recipients verify the signature using the DNS-published public key.
- Choose a selector name that remains manageable across renewals.
- Generate a robust RSA key pair with adequate length, typically 2048 bits or higher.
- Store the private key securely on your mail server or FluentSMTP environment.
Understand public vs private keys
The private key signs your email headers and body, producing the DKIM-Signature. The public key is published as a DNS TXT record and is used by recipients to verify the signature. A mismatch or key exposure can break DKIM validation, so keep the private key protected and rotate keys periodically.
- The private key remains on the signing server only.
- The public key is published in a DNS TXT record under the selector name.
- Rotation should be planned to minimize verification gaps during updates.

4. Publish the DKIM Public Key in DNS
Create the DKIM DNS TXT record
Publish the public key as a DNS TXT record under your domain with the chosen selector. The record links the selector to the public key and allows verifiers to retrieve the key during DKIM checks. Use a form like: selector._domainkey.yourdomain.com and include the v=DKIM1; k=rsa; p=PUBLIC_KEY_VALUE string. This value is lengthy and must be copied exactly from the generated key.
- Keep the selector consistent with your signing configuration.
- Include the full base64 public key without line breaks in the DNS field.
- Avoid extra spaces that could break parsing by verifiers.
Verify DNS changes are live
After publishing, check propagation across DNS servers. Look for the TXT record returning the public key when queried with the selector and domain. Use a DNS lookup tool to confirm the exact p= value matches your generated key. Allow time for global propagation to ensure consistency across providers.
- Confirm the record type is TXT and the host is selector._domainkey.yourdomain.com.
- Double check that the public key begins with the expected base64 segment.
- Document the timestamp of publication for rotation planning.
5. Configure FluentSMTP to Sign Outbound Mail with DKIM
Enable DKIM signing in FluentSMTP
Enable DKIM signing so every outbound message carries a verifiable signature. The signing process uses your server’s private key to generate the DKIM-Signature header, tying each mail to your domain.
- Ensure the private key is stored securely with restricted access and rotation logs.
- Verify that the signing scope covers all domains and subdomains you send from to prevent gaps.
Choose selector and domain alignment settings
Pick a DKIM selector you will reference in DNS and in FluentSMTP. Domain alignment affects verification outcomes by determining how strictly the signer’s domain matches the From domain.
- Selector: choose something memorable and consistent, such as default or fluentdkim, and document it.
- Domain alignment: use strict alignment for single-brand sending, or relaxed alignment when you publish multiple From domains.
- Practical tip: after changes, send a test message to verify the DKIM header passes at major providers and review any bounce codes.
6. Validate SPF and DKIM Configuration
Use online verification tools
Start with a quick external check to confirm your SPF and DKIM records are visible and correct. Use reputable tools to verify syntax, record type, and propagation status. These checks help catch common DNS formatting errors before you test mail flow.
- SPF should return a pass for authorized sending IPs and include all FluentSMTP sources.
- DKIM should show a valid public key associated with your selector and domain.
- If either record fails, review TXT formatting and DNS propagation timing.
Test with real emails and interpret results
Send test messages from FluentSMTP to several inbox providers. Review headers to confirm SPF and DKIM results on each recipient. Look for a passing SPF check and a valid DKIM-Signature verification.
- Check the Received-SPF and Authentication-Results headers for SPF pass and DKIM pass.
- If DKIM fails, verify the signing domain, selector, and that the public key matches the DNS record.
- Document any discrepancies and adjust your configuration to maintain consistent deliverability.
FAQ
Q: What is DKIM and why should I use it with FluentSMTP? A: DKIM adds a cryptographic signature to outgoing messages, which helps prove the email came from your domain and hasn’t been altered in transit. This strengthens email authentication and deliverability when using FluentSMTP.
Q: How do SPF and DKIM differ in function? A: SPF authorizes which servers can send on behalf of your domain, while DKIM verifies message integrity and origin via a cryptographic signature. They work together to reduce spoofing and phishing risks.
Q: Can I use DKIM with multiple domains? A: Yes. Each domain should have its own DKIM selector and corresponding DNS TXT record. FluentSMTP can sign messages for all configured domains if you set up keys and selectors correctly.
Q: What about DMARC after SPF and DKIM setup? A: DMARC builds on SPF and DKIM. It provides a policy for how receivers handle messages that fail authentication and reports back to you. Consider enabling DMARC alongside SPF and DKIM for a fuller email security posture.
Q: How long does DNS propagation take for DKIM records? A: Propagation can vary by provider but generally ranges from a few minutes to 48 hours. Plan updates with this window in mind and verify with DNS lookups after publishing.
Conclusion
Setting up SPF and DKIM for FluentSMTP strengthens your domain’s email authentication and improves deliverability. The steps ensure legitimate senders are recognized and messages stay intact in transit.
- Confirm that SPF lists all FluentSMTP sending sources, including any third party services, to avoid false negatives.
- Publish a DKIM public key as a DNS TXT record and configure FluentSMTP with the matching selector and signing domain.
- Enable DKIM signing and choose alignment that fits your domain strategy, such as relaxed for subdomains or strict for the root domain.
- Test with real campaigns and verification tools to confirm both records pass SPF and DKIM checks across major providers.
With verified SPF and DKIM, you reduce spoofing and phishing risk while strengthening overall email security. Schedule quarterly reviews to add new sending domains, rotate keys as needed, and revalidate after DNS changes.
