Various email providers have begun to clamp down on incoming emails that are deemed "untrusted". If you haven't properly set up your email environment, you could find your emails being rejected by the major providers, or more frequently ending up in "Junk" folders where users won't see them. To get your email trusted today really requires that you set up a “Domain-based Message Authentication, Reporting & Conformance" (DMARC) record for your domains - and that requires setting up a couple of other things as well.
One thing to keep in mind - you cannot make a recipient provider trust your emails. Emails may be rejected or go to a Junk folder for a variety of reasons, including how the recipient decides to handle the emails. But what you can do is give more reasons for them to trust your emails. Avoid sending emails that "look" spammy, such as having long recipient lists (including Bcc lists), generic attributions, lots of external links to images, etc. If your business requires sending bulk emails, consider setting up a subdomain (something like, "lists.mydomain.com") instead of using your primary domain so that if your bulk domain runs afoul of a recipient provider, your own business emails aren't affected. If you use bulk email tools/third-party providers like SendGrid, also make sure you include their info in your records as shown below.
From an infrastructure standpoint, however, there are several things that you absolutely should be doing these days to increase the trust of your emails. It involves a lot of letters, that we will explain in a moment - SPF, DKIM and DMARC. And you will need access to change your domain's DNS records.
If you are a simple office, with just email provided by a major provider like Microsoft 365 or Google, it is actually very easy to set all of this up. If you have more complicated needs - such as using other service providers that send email on your behalf, like HubSpot or Salesforce for example, you will need to check with each provider to get the information you need.
First, there are two methods we can use to help get your messages to be better trusted - Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM). They both provide trust information, but for two different things - SPF tells a recipient to trust based on the source IP address of the sending email server, while DKIM increases the trust of the message itself. You can use one or the other, but you really should do both.
Let's talk about SPF first. In a way it is much simpler - if you know the information. SPF is a DNS record that lists all the IP addresses that are considered trusted sources for your email, and what to do if email comes from a source not listed. If you only use a single service provider, they will often give the values of this record to you. For instance, if you only use Microsoft 365, your record may look something like this:
"v=spf1 include:spf.protection.outlook.com -all"
This record tells a recipient system to do another DNS lookup for "spf.protection.outlook.com" for an SPF record and include the results as if they were in your own record - that way you don't need to know all the IP addresses of Microsoft's servers (I'll explain the "-all" at the end in a bit). If you have multiple providers, or you maintain servers that send email, etc. you will need to construct a record that includes EVERYTHING that you know of. There are a variety of ways to add things to this record - rather than list them all here, you can refer to this document from Google, but here is an example…let's say, we use Microsoft 365 for our main email, but we have a server that has a public address of "W.X.Y.Z" that also sends email directly to recipients (for example, our monitoring system.) Our record might instead look like:
"v=spf1 ip4:W.X.Y.Z include:spf.protection.outlook.com -all"
Be aware that the maximum length of an SPF (or any DNS TXT) record is 255 characters - if for some reason your record would exceed this length, you can simply create another record, say "spf1.mydomain.com", in the same format with some of the addresses, and then include that in your main record:
"v=spf1 include:spf1.mydomain.com include:spf.protection.outlook.com -all"
You can also use network ranges in an "ip4" specification, like "ip4:W.X.Y.0/24". Note also for IP addresses these are the PUBLIC IP addresses the system would be seen as. If they go through a NAT firewall, be sure to use the external address.
This record goes in your DNS for the domain(s) you are sending email from - typically in the "apex" record, as of type "TXT". How you enter this depends on your DNS provider. You may have other TXT records already - it is fine having several.
The "-all" shown in all the examples basically says to a recipient, "These are ALL the trusted sources, and if you get email from ANY other source, don't trust it." What the recipient will do depends on their own settings. Another option is "~all", which is referred to as "SoftFail", which tells the recipient "You should accept it, but treat it as suspicious…" This might result in it more likely ending up in Junk, however.
DKIM works a bit differently. Instead of us having to define our sending systems, we instead have the sending system cryptographically sign each email that goes through it. Then, when the recipient's system receives it, it looks up the public key via DNS and decrypts the signature. If the signature matches, the message is considered trusted because we know it came from the domain. If the signature does not match, the message is considered untrusted. If no signature is included, the default response is neutral, at least in the absence of a DMARC record that says otherwise – more on that in a bit.
Most major providers support automatically generating the keys, providing the DNS record details, and signing the emails automatically for you, once you follow their instructions on setting it up. When you first enable DKIM at your email provider, you will be given the DNS records to add to your DNS provider. Often these are references to other DNS entries that you add as a CNAME in your DNS. If you are doing this yourself, you will add a specially formatted TXT record. Once the email provider detects that the DNS records are in place, it will begin signing the emails.
Let's look at an example of setting this up in Microsoft 365.
1. Access DKIM Settings in Microsoft 365:3. Configure CNAME Records:
4. Understand Selector Names and Key Rotation:
5. Verify and Enable DKIM Records:
6. Implement Email Routing for DKIM:
7. Set Up DMARC Record:
OK...now that we've got our SPF and/or DKIM records in place, what about this DMARC thing?DMARC is another TXT record, which goes into our DNS example.com domain as "_dmarc.example.com". Here is a simple example:
"v=DMARC1; p=none; rua=mailto:mailadmin@example.com"
It has several "tags", separated by semi-colons. The first two shown are required:
v=DMARC1
This specifies the type and version of the record this is. "DMARC1" is the only possible value currently. It also must be first in the line. For all others the order does not matter.
p=none
This specifies the "policy" to apply to messages that do not pass DMARC. Here "none" means that you are not directing action - that leaves the recipient to do whatever they would do by default. This does NOT mean "accept it regardless", but it's the value you should use initially until you are confident that your other records are complete.All other tags are optional, but here are a few common ones:
rua=mailto:emailaddress…
This tells a recipient system where to send an Aggregate Report to. Typically, once a day in which any email is received from the sending domain, a recipient system set up for sending these reports (the
major providers do this at least) will send a XML-formatted report to the email address listed. More than one address can be specified with comma separation. Each address must have "mailto:" prepended.
ruf=mailto:emailaddress…
Similar to "rua", "ruf" sends Forensic Reports to the listed email addresses. A forensic report is usually sent immediately upon a failure and contains more information. However, they are not necessarily sent for each failure, and they are less implemented than Aggregate Reports. They can be extremely helpful in solving problems if they are sent.
pct=N
In conjunction with "p=quarantine" or "p=reject", "pct" tells a recipient what percentage of email from a sender should be subject to the policy, with "N" being a number from 0-100. This is used to slowly transition from a policy of "p=none" and give time to analyze the reports and avoid legitimate email from being affected. If not specified, the default is 100.
aspf=r; adkim=r
"aspf" and "adkim" can be important and refer to how a recipient will interpret an "alignment" failure vs a direct SPF or DKIM failure respectively. That requires a bit of explanation and a bit of understanding of the SMTP protocol.
If the MailFrom (aka Envelope From) of a message has a domain of example.com, and the From: header has an email address with the matching domain "example.com", then the message is considered "aligned", and all is good.
If for some reason these differ - say, the MailFrom had a subdomain of "lists.example.com" while the From: header simply had example.com, the alignment would be "failed" as they don't match, but it might be desirable to allow for subdomains to pass this particular test. As such, we can tell recipients to use a "relaxed" alignment, which allows subdomains to pass the alignment check. This is the default, but we can specify by setting the particular tag to "r". If we want a "strict" alignment check, we can set the value to "s". An alternative to a relaxed alignment is to have SPF and DKIM set up independently for all your subdomains.
If you use some services that send email on your behalf, you most like need to have your alignments set to "relaxed" anyway as they may be using their own domain in parts of the message which can cause an SPF Alignment failure, but as long as the DKIM alignment passes, your messages should be good.
8. Document Your DNS Records:
So now, after all that, you should be better protected from others spoofing your email addresses and have more confidence that your legitimate emails will be handled properly. This still does not guarantee anything…recipients can still report your emails as Junk (even accidentally!) - you can only control your end of the equation.
At iuvo, our team of experts are dedicated to helping you optimize your systems for maximum security and efficiency. Whether you're a small business or a large enterprise, our tailored solutions ensure that your infrastructure is robust, and your communications are secure.
Contact us today and take the first step towards a more secure and trustworthy environment for your business.
Related Content: