{"id":1164,"date":"2026-03-13T09:00:00","date_gmt":"2026-03-13T09:00:00","guid":{"rendered":"https:\/\/exposiq.ch\/email-security-how-to-configure-spf-dkim-and-dmarc-correctly\/"},"modified":"2026-03-13T09:00:00","modified_gmt":"2026-03-13T09:00:00","slug":"email-security-how-to-configure-spf-dkim-and-dmarc-correctly","status":"publish","type":"post","link":"https:\/\/exposiq.ch\/en\/email-security-how-to-configure-spf-dkim-and-dmarc-correctly\/","title":{"rendered":"Email Security: How to Configure SPF, DKIM and DMARC Correctly"},"content":{"rendered":"<p>Email remains the most important communication channel for Swiss businesses &#8212; and at the same time one of the most popular attack targets. Phishing, Business Email Compromise (BEC), and email spoofing cause billions in damages worldwide. The good news: with the three DNS standards SPF, DKIM, and DMARC, email spoofing can be effectively prevented. The bad news: many SMEs have not configured these standards or have configured them incorrectly.<\/p>\n<h2>Why Email Spoofing Is So Dangerous<\/h2>\n<p>Email spoofing means that an attacker sends emails that appear to come from your domain. The sender displays &#8220;info@yourcompany.ch&#8221; &#8212; but the email comes from a completely unrelated server. Without appropriate protective measures, there is no technical way for the recipient to detect the forgery.<\/p>\n<p>The consequences can be severe:<\/p>\n<ul>\n<li><strong>Business Email Compromise (BEC):<\/strong> Attackers impersonate the CEO or finance manager and instruct payments. According to FBI statistics, BEC causes more financial damage than ransomware.<\/li>\n<li><strong>Phishing targeting customers and partners:<\/strong> Your business partners receive deceptively authentic emails with your sender address, linking to phishing sites or malware. The reputational damage is enormous.<\/li>\n<li><strong>Deliverability issues:<\/strong> If your domain is abused for spam, your legitimate emails also end up on blocklists. Deliverability suffers.<\/li>\n<\/ul>\n<p>In Switzerland, the BACS (Federal Office for Cybersecurity, formerly NCSC) has been observing an increase in BEC attacks specifically targeting Swiss SMEs for years. The damage per incident ranges from a few thousand to several hundred thousand francs.<\/p>\n<h2>The Three Protection Mechanisms Explained<\/h2>\n<h3>SPF (Sender Policy Framework)<\/h3>\n<p>SPF is the simplest of the three standards. An SPF record is a DNS entry (TXT record) that defines which servers are allowed to send emails on behalf of your domain.<\/p>\n<p>A typical SPF record looks like this:<\/p>\n<p><strong>v=spf1 include:_spf.google.com include:spf.hostpoint.ch ip4:203.0.113.5 -all<\/strong><\/p>\n<p>This record says: &#8220;Only Google Workspace, Hostpoint mail servers, and the server with IP 203.0.113.5 are allowed to send emails for this domain. All others will be rejected.&#8221;<\/p>\n<p>Common SPF mistakes:<\/p>\n<ul>\n<li><strong>~all instead of -all:<\/strong> The tilde character means &#8220;softfail&#8221; &#8212; suspicious emails are flagged but not rejected. Only &#8220;-all&#8221; (hardfail) provides real protection.<\/li>\n<li><strong>Missing entries:<\/strong> Newsletter services, CRM systems, or web forms send emails through third-party servers that are missing from the SPF record.<\/li>\n<li><strong>Too many DNS lookups:<\/strong> SPF allows a maximum of 10 DNS lookups. Having too many &#8220;include&#8221; entries exceeds the limit and invalidates the SPF record.<\/li>\n<li><strong>Multiple SPF records:<\/strong> Only one SPF record is allowed per domain. Two records cause SPF to be completely ignored.<\/li>\n<\/ul>\n<h3>DKIM (DomainKeys Identified Mail)<\/h3>\n<p>DKIM goes a step further than SPF: it signs every outgoing email with a cryptographic key. The receiving server verifies the signature using a public key that is also stored as a DNS record.<\/p>\n<p>DKIM offers two advantages over SPF:<\/p>\n<ul>\n<li><strong>Integrity protection:<\/strong> DKIM checks not only the sender but also whether the email was tampered with during transit.<\/li>\n<li><strong>Forwarding:<\/strong> SPF fails with forwarded emails (the forwarding server is not in the SPF record). DKIM signatures survive forwarding as long as the content is not modified.<\/li>\n<\/ul>\n<p>Setting up DKIM requires collaboration with your email provider: the provider generates the key pair, signs outgoing emails, and provides the public key that must be entered as a DNS record.<\/p>\n<h3>DMARC (Domain-based Message Authentication, Reporting and Conformance)<\/h3>\n<p>DMARC is the crucial piece of the puzzle. It defines what should happen to emails that fail both SPF and DKIM &#8212; and delivers reports about them.<\/p>\n<p>A DMARC record looks like this:<\/p>\n<p><strong>v=DMARC1; p=reject; rua=mailto:dmarc@yourcompany.ch; ruf=mailto:dmarc@yourcompany.ch; adkim=s; aspf=s<\/strong><\/p>\n<p>The key parameters:<\/p>\n<ul>\n<li><strong>p=none:<\/strong> Monitoring mode &#8212; emails are delivered, but reports are generated. Suitable for getting started.<\/li>\n<li><strong>p=quarantine:<\/strong> Suspicious emails are moved to the spam folder.<\/li>\n<li><strong>p=reject:<\/strong> Suspicious emails are completely rejected. This is the goal.<\/li>\n<li><strong>rua:<\/strong> Address for aggregate reports (daily summary)<\/li>\n<li><strong>ruf:<\/strong> Address for forensic reports (individual failed emails)<\/li>\n<\/ul>\n<h2>Step-by-Step Setup<\/h2>\n<p>The following guide describes the setup with the most common Swiss hosting providers.<\/p>\n<h3>Step 1: Check the Current State<\/h3>\n<p>Before making any changes, check the current state of your DNS records. An automated DNS scanner will immediately show whether SPF, DKIM, and DMARC are present and correctly configured. Many SMEs discover during this process that SPF exists but is faulty &#8212; or that DMARC is completely missing.<\/p>\n<h3>Step 2: Create or Correct the SPF Record<\/h3>\n<p>List all services that send emails on behalf of your domain:<\/p>\n<ul>\n<li>Your email provider (Hostpoint, Infomaniak, Google Workspace, Microsoft 365)<\/li>\n<li>Newsletter services (Mailchimp, CleverReach, Brevo)<\/li>\n<li>CRM and ERP systems<\/li>\n<li>Website forms (often via the web server)<\/li>\n<li>Ticketing or helpdesk systems<\/li>\n<\/ul>\n<p><strong>At Hostpoint:<\/strong> Log in to the Control Panel, navigate to &#8220;Domains&#8221; then your domain then &#8220;DNS Editor&#8221;. Create a TXT record for the main domain with the SPF value. Hostpoint typically uses: <strong>include:spf.hostpoint.ch<\/strong><\/p>\n<p><strong>At Infomaniak:<\/strong> Under &#8220;Web &#038; Domain&#8221; then &#8220;DNS Zone&#8221; then &#8220;Add Entry&#8221;. Infomaniak uses: <strong>include:_spf.infomaniak.ch<\/strong><\/p>\n<p><strong>At cyon:<\/strong> Under &#8220;my.cyon.ch&#8221; then &#8220;Domains&#8221; then &#8220;DNS\/Nameserver&#8221;. cyon uses: <strong>include:spf.cyon.ch<\/strong><\/p>\n<h3>Step 3: Activate DKIM<\/h3>\n<p>DKIM activation depends heavily on the provider:<\/p>\n<ul>\n<li><strong>Hostpoint:<\/strong> DKIM is automatically set up for email accounts. Check in the Control Panel that the DNS records are correctly configured.<\/li>\n<li><strong>Infomaniak:<\/strong> DKIM is enabled by default. The DNS record is set automatically.<\/li>\n<li><strong>Google Workspace:<\/strong> DKIM must be manually enabled in the Admin Console under &#8220;Apps&#8221; then &#8220;Google Workspace&#8221; then &#8220;Gmail&#8221; then &#8220;Authenticate email&#8221;. You must enter the generated TXT record in DNS yourself.<\/li>\n<li><strong>Microsoft 365:<\/strong> DKIM is configured in the Exchange Admin Center under &#8220;Protection&#8221; then &#8220;DKIM&#8221;. Two CNAME records are required.<\/li>\n<\/ul>\n<h3>Step 4: Set Up the DMARC Record<\/h3>\n<p>Always start in monitoring mode (p=none) to see which emails pass SPF and DKIM and which do not.<\/p>\n<p>Create a TXT record for <strong>_dmarc.yourdomain.ch<\/strong> with the value:<\/p>\n<p><strong>v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.ch<\/strong><\/p>\n<p>Keep this mode active for 2 to 4 weeks and evaluate the incoming reports. The reports show which servers are sending emails for your domain and whether they pass SPF\/DKIM. This allows you to identify whether any servers are missing from the SPF record before switching to &#8220;quarantine&#8221; or &#8220;reject&#8221;.<\/p>\n<h3>Step 5: Tighten the Policy<\/h3>\n<p>After ensuring that all legitimate email sources are correctly authenticated, tighten the DMARC policy gradually:<\/p>\n<ol>\n<li>First <strong>p=quarantine<\/strong> for 2 weeks<\/li>\n<li>Then <strong>p=reject<\/strong> as the permanent setting<\/li>\n<\/ol>\n<p>Make sure to continue monitoring the rua reports to detect issues early.<\/p>\n<h2>Common Mistakes and Pitfalls<\/h2>\n<p>From practical experience with hundreds of DNS analyses, typical error patterns emerge:<\/p>\n<ul>\n<li><strong>SPF without DMARC:<\/strong> SPF alone has limited value. Without DMARC, each receiving server decides for itself what to do with failed SPF checks &#8212; usually nothing.<\/li>\n<li><strong>DMARC left at p=none:<\/strong> Many SMEs set up DMARC in monitoring mode and forget to tighten the policy. &#8220;p=none&#8221; does not protect &#8212; it only observes.<\/li>\n<li><strong>Forgetting newsletter services:<\/strong> The most common reason for DMARC failures after tightening: a newsletter service that is not in the SPF record and does not use DKIM for your domain.<\/li>\n<li><strong>Not covering subdomains:<\/strong> DMARC can cover subdomains with &#8220;sp=reject&#8221;. Without this setting, attackers can use spoofing@anything.yourdomain.ch.<\/li>\n<li><strong>Not evaluating DMARC reports:<\/strong> The reports are in XML format and not particularly user-friendly. Free services exist that process these reports &#8212; use them.<\/li>\n<\/ul>\n<h2>Automated Checking: Why Manual Verification Does Not Scale<\/h2>\n<p>Manually checking SPF, DKIM, and DMARC records is feasible for one domain. But most SMEs operate multiple domains: the main domain, a .com variant, possibly a product domain, or the domain of a subsidiary. Each domain needs its own records, and every change to the email setup (new newsletter provider, new CRM) requires adjustments.<\/p>\n<p>Automated DNS scanners check all of a company&#8217;s domains regularly and report:<\/p>\n<ul>\n<li>Missing SPF, DKIM, or DMARC records<\/li>\n<li>Syntax errors in existing records<\/li>\n<li>SPF records with too many DNS lookups<\/li>\n<li>DMARC in pure monitoring mode (p=none)<\/li>\n<li>Missing subdomain policies<\/li>\n<li>Expired or weak DKIM keys<\/li>\n<\/ul>\n<h2>What Swiss SMEs Should Do Now<\/h2>\n<p>Setting up SPF, DKIM, and DMARC is not a mammoth project. For a typical SME with one domain and one email provider, the configuration can be completed in a few hours. The effort is entirely disproportionate to the protection these measures provide.<\/p>\n<p>Priority list:<\/p>\n<ol>\n<li>Check the current state of all your domains with an automated DNS scanner<\/li>\n<li>Correct faulty SPF records and switch to &#8220;-all&#8221; (hardfail)<\/li>\n<li>Activate DKIM with your email provider<\/li>\n<li>Set up DMARC in monitoring mode and evaluate the reports<\/li>\n<li>Tighten DMARC to &#8220;p=reject&#8221; after a successful test phase<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>Email spoofing is a solved problem &#8212; at least technically. Together, SPF, DKIM, and DMARC provide effective protection against sender forgery. What is missing is consistent implementation. Many Swiss SMEs leave their most important communication infrastructure unprotected, even though the solution is available and free.<\/p>\n<p>ExposIQ automatically checks the email security configuration of your domains as part of every scan: SPF, DKIM, DMARC, MX records, and DNSSEC. Misconfigurations are clearly identified and prioritised. Combined with over 35 additional scan engines for network, web, and infrastructure security. Hosted in Switzerland, nDSG-compliant, from CHF 99 per month. Learn more at <a href=\"https:\/\/exposiq.ch\/en\/\">exposiq.ch<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Email remains the most important communication channel for Swiss businesses &#8212; and at the same time one of the most popular attack targets. Phishing, Business Email Compromise (BEC), and email spoofing cause billions in damages worldwide. The good news: with the three DNS standards SPF, DKIM, and DMARC, email spoofing can be effectively prevented. The &#8230; <a title=\"Email Security: How to Configure SPF, DKIM and DMARC Correctly\" class=\"read-more\" href=\"https:\/\/exposiq.ch\/en\/email-security-how-to-configure-spf-dkim-and-dmarc-correctly\/\" aria-label=\"Read more about Email Security: How to Configure SPF, DKIM and DMARC Correctly\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"rank_math_focus_keyword":"spf dkim dmarc configuration","rank_math_title":"Email Security: How to Configure SPF, DKIM and DMARC Correctly","rank_math_description":"Email spoofing is a top attack vector. SPF, DKIM and DMARC explained simply with step-by-step guide for Swiss hosting providers.","rank_math_robots":"","rank_math_canonical_url":"","rank_math_primary_category":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-1164","post","type-post","status-publish","format-standard","hentry","category-it-sicherheit","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"_links":{"self":[{"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/posts\/1164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/comments?post=1164"}],"version-history":[{"count":0,"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/posts\/1164\/revisions"}],"wp:attachment":[{"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/media?parent=1164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/categories?post=1164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exposiq.ch\/en\/wp-json\/wp\/v2\/tags?post=1164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}