Establishing proper SPF (Sender Policy Framework) records is fundamental for email authentication and deliverability, yet complexities like CNAME usage can introduce significant vulnerabilities. Recent incidents highlight how hijacked subdomains, even those with seemingly valid SPF, DKIM, and DMARC records, can be exploited for massive spam campaigns. This underscores the need for vigilant management of DNS records and a careful approach to SPF configuration, especially concerning CNAMEs.
Key findings
Subdomain hijacking: Malicious actors are exploiting hijacked subdomains and expired domains to send spam that surprisingly passes major email authentication checks like SPF, DKIM, and DMARC.
DNS lookup limits: SPF records must adhere to a strict 10 DNS lookup limit. Exceeding this can lead to authentication failures, causing legitimate emails to be blocked. Regularly review and consolidate your SPF records to stay within this critical boundary.
Cname risks: While CNAMEs offer convenience for providers, they can introduce complexities and potential vulnerabilities for SPF records. Experts increasingly recommend avoiding CNAMEs for SPF if direct IP publishing is an option.
Dynamic threats: Spammers are continuously developing sophisticated methods to bypass email authentication protocols. This requires organizations to adopt proactive and adaptive security measures beyond basic SPF, DKIM, and DMARC implementations.
Key considerations
Audit dns records: Regularly audit all your DNS records, including those for subdomains, to prevent unauthorized takeover or misuse. Ensure all entries are current and necessary.
Direct ip inclusion: For dedicated IPs, directly include them in your SPF record using the ip4 or ip6 mechanisms instead of relying on CNAMEs, which can obscure the actual sending source.
Implement DMARC: Beyond SPF, a robust DMARC policy with alignment is essential to instruct receiving mail servers on how to handle emails that fail authentication. Learn more about DMARC best practices.
Authorized sources: Only list authorized IP addresses and sending servers in your SPF record. Overly permissive SPF records can be exploited. See AutoSPF's best practices for more information.
Ongoing monitoring: Implement continuous monitoring for DNS changes, expired domains, and suspicious email activity. This vigilance is key to identifying and mitigating threats quickly. If you are struggling with issues, explore troubleshooting SPF authentication with various setups.
Email marketers often grapple with the technicalities of SPF records and CNAMEs, balancing ease of setup with security. Recent revelations about hijacked subdomains and email authentication bypasses have brought these concerns to the forefront, prompting marketers to reconsider conventional practices and seek more robust solutions for domain protection and deliverability.
Key opinions
Awareness gap: Many brands, regardless of size, are unaware of the critical need to continuously update and monitor their DNS records, leaving them vulnerable to exploits like subdomain hijacking. This knowledge gap is a significant concern for marketers.
Unexpected bypasses: It is alarming that malicious campaigns are successfully passing SPF, DKIM, and DMARC, indicating a gap in current authentication strategies. Marketers need to understand how these sophisticated attacks circumvent existing protections.
Cname convenience vs. risk: While CNAMEs are convenient for ESPs to manage, marketers are questioning their long-term security implications. The balance between operational ease and potential vulnerability is a key discussion point.
DNS bloat: Marketers are frustrated when ESPs advise adding unnecessary SPF includes, especially when the domain is not used in the return-path, leading to bloated DNS records that can cause future problems.
Key considerations
Proactive monitoring: Marketers should adopt a proactive stance on monitoring their domain's DNS records for any unauthorized changes or expired subdomains. This vigilance is crucial for maintaining domain reputation.
Minimize CNAME use: If possible, marketers should push their ESPs for alternatives to CNAME-based SPF records, opting for direct IP inclusion to enhance security and transparency. Understand how CNAME records impact DNS.
Validate return-path: Ensure that any SPF includes added to your domain genuinely correspond to a return-path domain used for your email sending, avoiding unnecessary bloat and potential issues. Mailgun provides a basic guide to SPF records.
Education and advocacy: Marketers should educate themselves on advanced email authentication techniques and advocate for more secure and transparent practices from their email service providers.
Marketer view
Email marketer from Email Geeks warns that it's shocking how easily subdomains can be hijacked for spam campaigns, even passing SPF, DKIM, and DMARC. Brands, regardless of size, often don't realize the importance of constantly updated DNS records. This highlights a critical knowledge gap in email security.
27 Feb 2024 - Email Geeks
Marketer view
Marketer from Mxtoolbox forum suggests that many email deliverability issues stem from overlooked DNS configurations, especially SPF records. A common mistake is not keeping records current with all sending sources, leading to legitimate emails failing authentication and potentially going to the spam folder.
15 Jan 2024 - Mxtoolbox
What the experts say
Email deliverability experts consistently advocate for meticulous SPF record management and caution against CNAME use due to emerging threats. They highlight the sophisticated tactics employed by bad actors to bypass authentication protocols, emphasizing that DMARC, while powerful, is not a complete panacea. The focus for experts is on secure, direct configurations and continuous vigilance against evolving spam techniques.
Key opinions
Cname avoidance: Many experts strongly recommend against using CNAMEs for SPF records, favoring more secure and transparent methods like direct IP inclusion, even if this means more manual updates.
Secure alternatives: For dedicated IPs, publishing those IPs directly in SPF is the most secure method. For shared IPs, using a dedicated return-path domain and including shared IPs is recommended, avoiding CNAMEs where possible. This is a core aspect of best practice for IP addresses in SPF.
DMARC limitations: While DMARC is crucial, experts note that spammers are increasingly finding creative ways to bypass DMARC alignment, such as leveraging compromised subdomains or exploiting legitimate services. This shows the ongoing arms race in email security.
Provider-driven issues: Concerns are raised about ESPs (Email Service Providers) and SaaS platforms that encourage practices leading to bloated or insecure SPF records, potentially harming the domain owner's reputation or creating vulnerabilities. Proper consolidation of SPF records is critical.
Key considerations
Continuous adaptation: Organizations and email professionals must continuously adapt their email authentication strategies to counter evolving spam and phishing tactics. This includes staying informed about new exploits and implementing preventative measures.
Vendor scrutiny: Scrutinize email service providers and other sending platforms for their SPF and authentication recommendations. Prioritize vendors that offer transparent and secure SPF configuration options over those relying on CNAMEs or overly broad includes.
Consolidated SPF: Ensure that your SPF record is a single, comprehensive TXT record that includes all legitimate sending sources without exceeding the 10 DNS lookup limit. Regularly prune unnecessary or redundant entries.
Beyond authentication: Recognize that even with perfect SPF, DKIM, and DMARC, other vulnerabilities can exist. For example, malicious payloads can be embedded in legitimate services. A comprehensive security strategy is necessary. Sendmarc's SPF optimization guide offers further insights.
Expert view
Deliverability Expert from Email Geeks indicates that she has been advising against the use of CNAMEs for SPF for years, even without direct evidence of problems, because it felt like an inherent risk. This recent news confirms those suspicions, revealing the extent of the vulnerabilities. Providers often opt for CNAMEs due to ease of management, reducing the burden of updates on their clients.
29 Feb 2024 - Email Geeks
Expert view
Email Deliverability Expert from Word to the Wise explains that a single SPF record should ideally be the only one for a domain, as multiple SPF records cause validation errors. Consolidating all legitimate sending sources into one record is a critical best practice to ensure proper authentication and prevent deliverability issues.
10 Apr 2024 - Word to the Wise
What the documentation says
Official documentation and technical guides provide clear mandates for SPF record configuration, emphasizing adherence to standards like DNS lookup limits and character restrictions. They highlight the primary role of SPF in preventing email spoofing and underscore the importance of explicitly authorizing all sending IP addresses. While CNAMEs are a general DNS record type, their interaction with SPF requires careful consideration to avoid authentication failures.
Key findings
Authentication purpose: SPF (Sender Policy Framework) is an email-authentication protocol designed to prevent email spoofing by verifying the legitimacy of sending mail servers. It helps to prevent unauthorized use of your domain. To understand the basics, refer to a simple guide to DMARC, SPF, and DKIM.
Authorized IPs: SPF records should explicitly list only authorized IP addresses and sending servers. Omitting legitimate senders or including unauthorized ones can lead to deliverability issues and security vulnerabilities. This is crucial for proper SPF function.
Strict limits: SPF records are subject to technical limitations, including a maximum of 10 DNS lookups and a total character limit of 255 per TXT record entry. Exceeding these limits can result in PermError failures.
Cname interaction: While a domain can have a CNAME record, directly applying an SPF record to a domain that is itself a CNAME target can cause issues, as SPF validation typically resolves to the CNAME's target. This makes CNAME use problematic for direct SPF setup.
Key considerations
Minimize lookups: To prevent PermError failures, ensure your SPF record minimizes DNS lookups. This often involves consolidating multiple include mechanisms or using IP addresses directly when possible. This is a critical factor in deliverability.
Regular updates: SPF records are not set and forget configurations. They must be updated whenever you change email service providers, add new sending services, or modify your sending infrastructure. Proper maintenance prevents authentication issues.
Comprehensive approach: While SPF is a key component, combine it with DKIM and DMARC for a comprehensive email authentication strategy. This multi-layered approach provides robust protection against spoofing and phishing attacks. To learn what SPF stands for and more, consult documentation.
Beware of indirect sources: Be cautious when third-party services provide CNAMEs for email authentication setup, especially if your primary domain also has an SPF record. Prioritize direct IP mechanisms when feasible. Higher Logic provides documentation on domain authentication.
Technical article
AutoSPF blog states that listing only authorized IP addresses and servers in an SPF record is crucial. Failing to do so can lead to spoofing and Business Email Compromise (BEC) attacks, and may even cause legitimate emails to be blocked by receiving mail servers, impacting deliverability.
20 Feb 2024 - AutoSPF
Technical article
MailerSend blog specifies that SPF records must not exceed 10 DNS lookups to avoid email authentication failure. This limit, defined by RFC 7208, is critical. Exceeding it will result in a PermError, meaning receiving servers will treat the SPF record as invalid and likely reject or quarantine the email.