When you're setting up DMARC, you’ll encounter several different tags that make up your policy record. One of the most important, yet sometimes misunderstood, is the aspf tag. This tag plays a critical role in how receiving mail servers validate your emails using SPF (Sender Policy Framework).
At its core, DMARC relies on a concept called "identifier alignment". It isn't enough for an email to just pass SPF or DKIM authentication. For an email to be DMARC compliant, the domain used in the SPF or DKIM check must align with the domain seen by the user in the 'From:' address. The aspf tag specifically controls the alignment rules for SPF.
The aspf tag is optional, but if you include it in your DMARC record, you can set it to one of two values: r for relaxed or s for strict. If you don't specify the tag at all, the default value is relaxed. As SiteGround points out, these tags define the alignment mode, and understanding the difference is key to a successful DMARC implementation.
When you set your policy to strict, you are telling receivers that the domain in the From: header must exactly match the domain used for the SPF check. The domain used for SPF authentication comes from the 'Return-Path' address (also known as the envelope from or MAIL FROM).
For example, if an email has a From: address of support@suped.com, the 'Return-Path' domain must also be suped.com. If the 'Return-Path' was something like bounces.suped.com, it would fail strict alignment because the domains are not an exact match.
Relaxed alignment, the default setting, is more flexible. It only requires that the domains share the same organizational domain. This means subdomains are permitted.
Using the same example, if the From: address is support@suped.com, the 'Return-Path' could be bounces.suped.com and it would still pass alignment. This is because both domains share the same root, or organizational, domain: suped.com.
For the vast majority of senders, relaxed alignment (aspf=r) is the correct choice. Many legitimate third-party email services (like marketing platforms, help desks, and transactional email providers) send emails on your behalf using a subdomain for their 'Return-Path' address to process bounces. If you use a strict policy, emails from these services might fail DMARC alignment and could be rejected.
Here is a quick summary:
In short, the aspf tag is a powerful tool for tightening your domain's email security. By understanding the difference between strict and relaxed alignment, you can configure your DMARC policy effectively, ensuring your legitimate emails are delivered while blocking fraudulent ones. Always start with relaxed alignment and only move to strict if you have a specific need and have verified it will not break your legitimate email flows.