{"id":7059,"date":"2018-08-14T14:19:43","date_gmt":"2018-08-14T18:19:43","guid":{"rendered":"https:\/\/www.thesslstore.com\/blog\/?p=7059"},"modified":"2020-12-15T10:09:38","modified_gmt":"2020-12-15T15:09:38","slug":"dmarc-reporting-and-email","status":"publish","type":"post","link":"https:\/\/www.thesslstore.com\/blog\/dmarc-reporting-and-email\/","title":{"rendered":"Email Security &#8211; Part 5: DMARC, Reporting and Email"},"content":{"rendered":"<h2>With email security protocols DKIM and SPF in place, understanding and implementing DMARC will take email security and reporting to the next level.<\/h2>\n<p>Since the start of this <a href=\"https:\/\/www.thesslstore.com\/blog\/email-security-part-1-certificate-signed-emails\/\">email security series<\/a>, we have looked into different components of the email process. Email has turned into a complex process and there are vulnerabilities with perceived patches at just about every turn. As mentioned in a previous post, much of this has to do with user processes and knowledge and, ultimately, it is up to the user to make sure that they are regulating their email traffic safely. All the tools help but they need to be properly implemented and maintained to stay safe.<span id=\"newline\"><\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-7064 size-medium\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Security-Audit-Virus-Scanning-225751942-300x300.jpg\" alt=\"DMARC\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Security-Audit-Virus-Scanning-225751942-300x300.jpg 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Security-Audit-Virus-Scanning-225751942-768x768.jpg 768w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Security-Audit-Virus-Scanning-225751942-1024x1024.jpg 1024w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Security-Audit-Virus-Scanning-225751942.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>Now that we&#8217;ve covered everything else, we\u2019ll take a look into the master sword, the infinity gauntlet, the one ring of email security that binds some security pieces together to form DMARC (Domain-Based Message Authentication, Reporting and Conformance). DMARC utilizes <a href=\"https:\/\/www.thesslstore.com\/blog\/dkim-domainkeys-identified-mail\/\">DKIM<\/a> and <a href=\"https:\/\/www.thesslstore.com\/blog\/email-security-spf\/\">SPF<\/a> (which are previous article topics) to report on how the email domain is doing: compliance, alignment, failures, etc.<\/p>\n<p>It is best to use an aggregator, such as (free ad placement) <a href=\"https:\/\/www.dmarcanalyzer.com\/\">DMARC Analyzer<\/a> or <a href=\"https:\/\/dmarcian.com\/\">DMARCian<\/a>, that does much of the heavy lifting and leaves a pretty report. Because the settings are handled in DNS, much like DKIM and SPF, the lookup is persistent to message transport, so you end up with DMARC reports of per message resulting in a volume count.<\/p>\n<p>Early in this series, I mentioned that this transition to The SSL Store, a marketing-heavy company, really forced me to think about email security, validity and such. This company generates a lot of email for not only marketing purposes, but also email verification for purchases, plus support throughout the certificate life cycle. There are also many sources of these email generations. So, when there were questions about our current risk, I knew that implementing all the tools and processes outlined in this series would help alleviate any doubt.<\/p>\n<p>Setting up our company\u2019s DMARC account with all our email domains has given me peace of mind and allows me to evaluate the overall status of our email flow.<\/p>\n<p>Before we start, here&#8217;s a quick graphic that illustrates how DMARC works, <a href=\"https:\/\/www.agari.com\/dmarc\/\">courtesy of Agari<\/a>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7065\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/DMARC-image-1.png\" alt=\"DMARC\" width=\"978\" height=\"480\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/DMARC-image-1.png 978w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/DMARC-image-1-300x147.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/DMARC-image-1-768x377.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/p>\n<h2>So, What\u2019s Required for DMARC?<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-7063\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Laptop-And-Envelopes-Malware-223765084-300x300.jpg\" alt=\"DMARC\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Laptop-And-Envelopes-Malware-223765084-300x300.jpg 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Laptop-And-Envelopes-Malware-223765084-768x768.jpg 768w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Laptop-And-Envelopes-Malware-223765084-1024x1024.jpg 1024w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-Laptop-And-Envelopes-Malware-223765084.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>Mentioned earlier, in this post and previous ones, SPF (Sender Policy Framework, AKA IP origination Validation) and DKIM (DomainKeys Identified Mail AKA Email Domain Validation) are the 2 main components that will make DMARC work correctly.<\/p>\n<p>As a quick recap, SPF identifies the IP addresses of the email origination (or known exchangers) in order to define what is valid. Email that originated from anything other than the SPF entry in the DNS record should be considered false and should not be trusted.<\/p>\n<p>DKIM uses a public key, created at the mail service (or server) level and stored in the DNS record, to sign certain parts of the email. Different stops in the email\u2019s transit can check the signature in the DNS record. If the key in the email matches what DNS reports back, then BAM! Everything is good.<\/p>\n<p>DMARC is recording the results of both other protocols per domain. It also allows for certain settings to determine how to handle failures of either or both. So, the other requirement is to consider how failures on either protocol are to be handled.<\/p>\n<h2>Love Me Some Options, So Let\u2019s Talk That<\/h2>\n<p>Whoa. Calm down there, sport. There are some options but let\u2019s make sure we\u2019re walking before we\u2019re running. There are some obvious <a href=\"https:\/\/www.thesslstore.com\/blog\/microsoft-announces-a-new-email-filtering-option-based-on-dmarc-score\/\">options for DMARC<\/a> Version 1 (which needs to be identified in the DMARC DNS record, e.g., v=DMARC1) and I imagine that future versions may offer an elevated number of options for administrators and postmasters worldwide.<\/p>\n<p>There are not a lot of options with the current versioning, yet, it&#8217;s required to be explicitly called in the DNS record so just go ahead and pencil that in.<\/p>\n<p>The policy, or <em>p, <\/em>is where the real decisions are made. This is what determines what happens with the traffic that fails either DKIM, SPF or both. The options are fairly simple:<\/p>\n<ul>\n<li><em>P=none <\/em>\u2013 No action will be taken. There will only be record of a failure.<\/li>\n<li><em>P=quarantine <\/em>\u2013 The email is flagged as spam and the mail exchanges\/inboxes will proceed with spam as they have defined.<\/li>\n<li><em>P=reject <\/em>\u2013 The email is flagged as malicious and should be dropped by any exchanger, domain or inbox client listening.<\/li>\n<\/ul>\n<p>Typically, when starting off, it would make complete sense to set the policy as <em>p=none <\/em>so the lay of the land can be surveyed and any potential issues\/bumps (on either SPF or DKIM) can be ironed out.<\/p>\n<p>There are also options for the reporting aspect of DMARC:<\/p>\n<ul>\n<li>rua \u2013 Indicates where the aggregated email reports should go. This is for the count (volume) of messages and how they did with SPF and DKIM. The destination is typically in the form of an email address. The DMARC services will often provide an email address to load in so that they can parse and arrange the data to something readable.<\/li>\n<li>ruf &#8211; Indicates where the forensic email reports should go. This has some more information for the SPF and DKIM failures used to investigate what went wrong. The destination is typically in the form of an email address. The DMARC services will often provide an email address to load in so that they can parse and arrange the data to something readable.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-7066 size-full\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/CheesyPoofs.png\" alt=\"Policy\" width=\"300\" height=\"300\">As the confidence level of the proper DKIM and SPF settings are valid, then the user can ramp up what they want to do with failures. Among DKIM, SPF and DMARC, it is best to do the research, follow the logic and then check the results. If all is well, you can be confident that your emails are trusted and any spoofer would be identified and, ideally, slain in their parents\u2019 CheesyPoof-dusted basement.<\/p>\n<h2>More Options! Whoooooa!<\/h2>\n<p>Whoooooa! Indeed, there are a few more options that have defaults associated to them. If they are not explicitly called, then the defaults will be assumed. Here are a some of them:<\/p>\n<ul>\n<li><strong>sp<\/strong> \u2013 This is for the subdomain policy. Like Policy (p), it has the option values for <em>none, quarantine<\/em> and <em>reject<\/em>. This is for any subdomain of the contextual appropriate email, so, you can have a different policy.<\/li>\n<li><strong>pct<\/strong> \u2013 This indicates the percentage of DMARC failures to be reported. Values can be any whole number from 0-100. This is typically used for testing but I suppose there are other options for using this. Default is set to 100 and implied if not specified.<\/li>\n<li><strong>adkim<\/strong> \u2013 This option specifies the alignment type for DKIM. The options include \u2018s\u2019 for strict and \u2018r\u2019 for relaxed (default value). If relaxed is desired, there is no need to add that option into the DNS record. Relaxed setting allows for subdomains to be used. Strict needs an exact match.<\/li>\n<li><strong>aspf<\/strong> \u2013 This option specifies the alignment type for SPF. The options include \u2018s\u2019 for strict and \u2018r\u2019 for relaxed (default value). If relaxed is desired, there is no need to add that option into the DNS record. Relaxed setting allows for subdomain to be used. Strict needs an exact match. As mentioned in previous blog posts, SPF calls for domain name or IP address, so this would not affect IP address listing.<\/li>\n<li><strong>fo<\/strong> \u2013 This stands for \u2018Forensic Options\u2019 and basically indicates the conditions in which a forensic report would be sent off. The values include \u20180\u2019, \u20181\u2019, \u2018d\u2019 and \u2018s\u2019.\n<ul>\n<li><strong>0<\/strong> \u2013 Indicates if DKIM and SPF fail. This is a pretty lax setting but certainly not unreasonable to use, especially if you think your DKIM and SPF records are up to date and high and tight.<\/li>\n<li><strong>1<\/strong> \u2013 Indicates if DKIM or SPF fail. This is a stricter setting and one that is recommended. If you think your DKIM and SPF records are up to date (and high and tight heh), then a failure in either would be a flag.<\/li>\n<li><strong>s<\/strong> \u2013 Indicates if SPF fails. If DKIM is not setup, this would be an option. If DKIM is not a problem, for whatever reason, this would an option.<\/li>\n<li><strong>d<\/strong> \u2013 Indicates if DKIM fails. If SPF is not setup, this would be an option. If SPF is not a problem (maybe dynamic IP or coming from something with many IPs that are not specified), this would be an option.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>How do we get this Frankenstein\u2019s Monster to \u201cIt\u2019s ALIIIIIVE!\u201d?<\/h2>\n<p>We made it this far. Noice. As with SPF and DKIM, all of this stuff is indicated in the appropriate DNS record. There are online services that will help you generate the DMARC record and the DMARC aggregators, also mentioned earlier, have generators that will give you the exact record including the emails (that they own) that parses this information and makes it nice and neat. Let\u2019s take a look at a sample record and dissect:<\/p>\n<p>v=DMARC1; p=quarantine; rua=mailto:ae799710f9ad889@rep.dmarcaggreagatorservice.com; ruf=mailto:ae799710f9ad889@for.dmarcaggreagatorservice.com; pct=100; sp=quarantine; adkim=s; aspf=s; fo=1<\/p>\n<ul>\n<li><strong>v=DMARC1<\/strong> \u2013 DMARC version. This must be in the record. Don\u2019t argue. Just Do it Swoosh.<\/li>\n<li><strong>p=quarantine<\/strong> \u2013 Policy is set to quarantine for failures. Recall that this setting flags the email as spam(mish) and exchangers\/inbox clients will do what they will do with it.<\/li>\n<li><strong>rua=mailto:ae799710f9ad889@rep.dmarcaggreagatorservice.com<\/strong> \u2013 This is the email, provided by a theoretical DMARC service, that all email will copy to for reporting\/monitoring. Don\u2019t bother doing anything with that email \u2013 I made it up.<\/li>\n<li><strong>ruf=mailto:ae799710f9ad889@for.dmarcaggreagatorservice.com<\/strong> \u2013 This is the email, provided by a theoretical DMARC service, that all information regarding DMARC failures will be sent. The service will then aggregate and report on those failures. Again, don\u2019t bother doing anything with that email \u2013 Also made up.<\/li>\n<li><strong>pct=100<\/strong> \u2013 This is the percentage of failures to capture \u2013 Like Freddie Mercury or Warren G, I want it all, hence, value = 100. This is the implied value so the same thing would happen if this wasn\u2019t even listed.<\/li>\n<li><strong>sp=quarantine<\/strong> &#8211; Policy for sub-domains is set to quarantine for failures. Recall that this setting flags the email as spam(mish) and exchangers\/inbox clients will do what they will do with it.<\/li>\n<li><strong>adkim=s<\/strong> \u2013 Strict DKIM policy \u2013 must match the domain exactly. No sub-domains.<\/li>\n<li><strong>aspf=s<\/strong> \u2013 Strict SPF Policy \u2013 must match the domains exactly. No sub-domains. IP addresses need not apply.<\/li>\n<li><strong>fo=1<\/strong> \u2013 This setting indicates that if DKIM or SPF fails, send a ruf to the email specified (see above).<\/li>\n<\/ul>\n<p>So, adding a TXT entry in the DNS record with name = <strong>_dmarc.YOURDOMAIN.com and a similar value listed above will get the DMARC active and working. Seemingly, one could build their own aggregator\/forensic system where it receives the information from email and then parses it appropriately, but these DMARC services are affordable and already setup and makes it easy. <\/strong><\/p>\n<p>I keep an eye on a site called <a href=\"https:\/\/www.senderscore.org\/\">SenderScore.org<\/a> to see our reputation. This site will show you some information of the bad people and the score will reflect it.<\/p>\n<p>Honestly, I am fairly new to DMARC. So, this information is fresh in my mind and new to me. I check DMARC everyday, watching my success percentages go up and up along with our reputation. It is easy to setup, easy to understand, pretty satisfying and, I would say, a must for companies similar to our email volume. Plus, it helps with scrutinizing.<\/p>\n<p>I will likely be switching topics for next post and I hope you enjoyed this series.&nbsp; So, yeah, stay safe and happy scrutinizing!<\/p>\n<h2>Check out the rest of the Email Security Series<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.thesslstore.com\/blog\/email-security-part-1-certificate-signed-emails\/\" target=\"_blank\" rel=\"noopener noreferrer\">Email Security \u2013 Part 1: Certificate Signed Emails<\/a><\/li>\n<li><a href=\"https:\/\/www.thesslstore.com\/blog\/email-security-part-2-phishing-and-other-falseness\/\" target=\"_blank\" rel=\"noopener noreferrer\">Email Security \u2013 Part 2: Phishing and Other Falseness<\/a><\/li>\n<li><a href=\"https:\/\/www.thesslstore.com\/blog\/email-security-spf\/\" target=\"_blank\" rel=\"noopener noreferrer\">Email Security \u2013 Part 3: Sender Policy Framework (SPF)<\/a><\/li>\n<li><a href=\"https:\/\/www.thesslstore.com\/blog\/dkim-domainkeys-identified-mail\/\">Email Security \u2013 Part 4: DKIM (DomainKeys Identified Mail)<\/a><\/li>\n<\/ul>\n\n","protected":false},"excerpt":{"rendered":"<p>With email security protocols DKIM and SPF in place, understanding and implementing DMARC will take email security and reporting to the next level. Since the start of this email security&#8230;<\/p>\n","protected":false},"author":11,"featured_media":7062,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":"","tve_updated_post":"","tve_custom_css":"","tve_user_custom_css":"","tve_globals":{},"tcb2_ready":0,"tcb_editor_enabled":0,"tve_landing_page":"","_tve_header":"","_tve_footer":""},"categories":[16],"tags":[7970],"class_list":["post-7059","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hashing-out-cyber-security","tag-email-security","post-with-tags"],"views":15976,"jetpack_featured_media_url":"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2018\/08\/bigstock-199765783.jpg","_links":{"self":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/7059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/comments?post=7059"}],"version-history":[{"count":0,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/7059\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media\/7062"}],"wp:attachment":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media?parent=7059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/categories?post=7059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/tags?post=7059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}