{"id":15978,"date":"2018-04-09T18:07:12","date_gmt":"2018-04-09T18:07:12","guid":{"rendered":"https:\/\/easydmarc.com\/blog\/?p=15978"},"modified":"2025-07-30T11:30:42","modified_gmt":"2025-07-30T11:30:42","slug":"how-to-add-opendkim-to-dns-on-linux-postfix","status":"publish","type":"post","link":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/","title":{"rendered":"Postfix DKIM and SPF Setup for OpenDKIM on Linux"},"content":{"rendered":"<p>In order to successfully add OpenDKIM to DNS on Linux, you need to understand some basic terms and tips.<\/p>\n<h2>3 must-know-terms to add Postfix DKIM to DNS<\/h2>\n<ul>\n<li>The Basic terms in Email authentication, DNS records, and other related concepts.<\/li>\n<li>DMARC and the Email authentication process.<\/li>\n<li>Anatomy of a <a href=\"https:\/\/easydmarc.com\/blog\/dmarc-step-by-step-guide\/\" target=\"_blank\" rel=\"noopener\">DMARC<\/a> Resource record in the DNS.<\/li>\n<\/ul>\n<p>If you are still hesitating to add <a href=\"https:\/\/easydmarc.com\/blog\/how-to-configure-dkim-opendkim-with-postfix\/\" target=\"_blank\" rel=\"noopener\">OpenDKIM<\/a> to DNS or not, here is interesting information and facts for you to make sure that email protection is your business trust, and for trust, it isn&#8217;t a good idea to save money.<\/p>\n<p>Now you are convinced that it is important to add DKIM to DNS for your email protection. So, let&#8217;s go through wiht it.<\/p>\n<h2>Why do we evaluate the importance of email protection?<\/h2>\n<p><span style=\"color: #333300;\" data-darkreader-inline-color=\"\">Easydmarc\u2019s email protection services make your business safe and secure from cyber attacks and especially, from phishing and spoofing. <strong>Email protection<\/strong> isn&#8217;t the companies primary need only, but also it is your companies <strong>trust, authority, and future<\/strong>.\u00a0<\/span><\/p>\n<h2><span style=\"color: #000000;\" data-darkreader-inline-color=\"\">EasyDMARC solution<\/span><\/h2>\n<p><span style=\"color: #333300;\" data-darkreader-inline-color=\"\">We understand your worries about cyber-risks. And because nowadays customer trust is the best future, thus we make <strong>your business trust our top priority<\/strong>.\u00a0 Email protection is what leads you to the bright future without any spam, phishing, and fraud.<\/span><\/p>\n<p>We suggest awesome tools and advanced solutions to individuals and organizations of all spheres and sizes. Far beyond any shadow of a doubt, a data-driven solution ensures your business email top security, nonetheless enabling DMARC is a lot easier to understand, adopt and maintain. Thus whilst providing advanced email protection services we also <strong>ensure your business trust and reliability with our data-driven technologies<\/strong>.\u00a0 At <a href=\"https:\/\/easydmarc.com\/\" target=\"_blank\" rel=\"noopener\">Easydmarc<\/a>, we provide a well-designed and user-friendly platform for getting full visibility of enlightened of your domain so as to do monitoring and get reports or alerts.<\/p>\n<blockquote><p><span style=\"color: #333300;\" data-darkreader-inline-color=\"\">Did you know that threats cost for businesses is more than $5.3 billion and cannot be detected by solutions that detect only malware?\u00a0<\/span><\/p><\/blockquote>\n<p>EasyDMARC also provides step-by-step instructions to help you set up, install and add OpenDKIM on DNS for multi-domains with Postfix on Linux.<\/p>\n<h3>Email authentication technologies<\/h3>\n<p>Email authentication isn&#8217;t new in the IT industry, moreover, it comes to the surface of the world a decade ago. From the 1980s with the\u00a0\u00a0Simple mail protocol aka SMTP creation, email authentication issues become more and more popular day by day and continuing its growth.\u00a0 Unfortunately, SMTP protocol doesn&#8217;t solve the problem of fraudulent and underhanded emails at all.<\/p>\n<p>At this point in time, it suffices to say that the infallible statement \u2018email infrastructure lies behind the scenes\u2019 is further established with the premise that DNS records, email authentication, open and click tracking, domain alignment, and the contents embedded in email headers all play an indispensable role as they all together ensure the smooth run and easy access that a user gains into an inbox and its contents.<\/p>\n<h3>Email authentication solves phishing problems<\/h3>\n<p>It becomes more difficult to handle all email security issues when spammers and bots are laying behind the scene. Spammers and hackers make money one this, and phishing is easy as well as fast. Sometimes\u00a0 \u2018spammers\u2019 hide their identity to avoid being tracked often operating via forged email addresses thereby causing a great deal of difficulty in tracing a message back to its source. Hence, SPF, DKIM, DMARC ensure maximum security of email addresses which becomes vital. These include the terms<\/p>\n<ul>\n<li><a href=\"https:\/\/easydmarc.com\/blog\/understanding-spf-sender-policy-framework-to-improve-email-delivery\/\" target=\"_blank\" rel=\"noopener\">Sender Policy Framework (SPF)<\/a><\/li>\n<li>DomainKeys Identified Mail (DKIM).<\/li>\n<li>DMARC- Domain-based Message Authentication, Reporting &amp; Conformance.<\/li>\n<\/ul>\n<p>After building a magic setup script coupled with an open source software bundle that enables a smooth encounter at transforming a server into a problem solver for emails with multiple domains, the following steps when strictly adhered aid in achieving the intended outcome we crave for.<\/p>\n<p>You can download our magic script from here.<\/p>\n<p>Here is how to go through the <strong>postfix DKIM setup<\/strong> and configure <strong>Postfix OpenDKIM<\/strong> for multiple domains with Postfix on Linux with the script below.<\/p>\n<pre>#!\/bin\/bash\n\n\nif [[ \"$1\" != \"INSTALL\" ]]\nthen\necho \"Note: please run from root user\"\necho \"This script will generate keys for domain and install openDkim postfix on this host\"\necho \"to process please use $0 INSTALL\"\nexit\nfi\n\necho -n 'Enter Domain name : '\nread domain_global\n\necho 'Specifies the selector, or name, of the key pair generated'\necho -n 'Enter group name\/DNS (node|mail) : '\nread group_name\n\necho Install opendkim and posfix\n\napt-get install -y opendkim opendkim-tools postfix mailutils\nmkdir -p \/etc\/opendkim\/${domain_global} &amp;&gt;\/dev\/null\n\necho ______________________________________________________________________________________\n\necho \"Generate key for ${domain_global}:${group_name}\"\nopendkim-genkey -D \/etc\/opendkim\/${domain_global} -d $domain_global -s $group_name\n\necho ______________________________________________________________________________________\n\necho 'Update keytable file'\necho \"${group_name}._domainkey.${domain_global} ${domain_global}:${group_name}:\/etc\/opendkim\/${domain_global}\/${group_name}.private\" &gt;&gt; \/etc\/opendkim\/keytable\n\necho ______________________________________________________________________________________\n\necho 'Update signingtable file' \necho ${domain_global} ${group_name}._domainkey.${domain_global} &gt;&gt; \/etc\/opendkim\/signingtable\n\necho ______________________________________________________________________________________\n\necho Configure OpenDKIM\necho 'SOCKET=\"local:\/var\/spool\/postfix\/var\/run\/opendkim\/opendkim.sock\"' &gt; \/etc\/default\/opendkim\nmkdir -p \/var\/spool\/postfix\/var\/run\/opendkim &amp;&gt;\/dev\/null\n\ncat &gt; \/etc\/opendkim.conf  &lt;&lt;EOF\nSyslog                  yes\nSyslogSuccess           yes\nLogWhy                  yes\nUMask                   002\nSoftwareHeader          yes\nOversignHeaders         From\nCanonicalization        relaxed\/relaxed\nKeyTable                file:\/etc\/opendkim\/keytable\nSigningTable            file:\/etc\/opendkim\/signingtable\nEOF\n\necho ______________________________________________________________________________________\n\necho 'Configure postfix '\npostconf -e milter_default_action=accept\npostconf -e milter_protocol=2\npostconf -e smtpd_milters=unix:\/var\/run\/opendkim\/opendkim.sock\npostconf -e non_smtpd_milters=unix:\/var\/run\/opendkim\/opendkim.sock<\/pre>\n<p>Download and rename txt file to an executable bash script.<\/p>\n<h3>Let&#8217;s go step by step with our installation script lines<\/h3>\n<p>You will need to run the script from the root user, the script will generate keys for a domain and install OpenDkim, Postfix on the host.<br \/>\nEnter a domain name, specify the selector after script will generate appropriate configurations.<br \/>\nAfter the successful installation, you will need to add very important DNS records for your domain.<\/p>\n<p>We shall now examine each of the email authentication concepts one after the other.<\/p>\n<h3>Sender Policy Framework (SPF)<\/h3>\n<p>This is a simple email-validation system that detects email spoofing by providing a mechanism that allows receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain\u2019s administrators.<br \/>\nThis can be achieved via configuring your SPF record with our <a href=\"https:\/\/easydmarc.com\/tools\/spf-lookup\" target=\"_blank\" rel=\"noopener\"><strong><span style=\"color: #003366;\" data-darkreader-inline-color=\"\">SPF wizard.<\/span><\/strong><\/a><\/p>\n<figure id=\"attachment_15903\" aria-describedby=\"caption-attachment-15903\" style=\"width: 432px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-15903\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/02\/spf.png\" alt=\"Sender-Policy-Framework-SPF\" width=\"432\" height=\"225\" \/><figcaption id=\"caption-attachment-15903\" class=\"wp-caption-text\">Fig 1. Sender Policy Framework (SPF)<\/figcaption><\/figure>\n<p>Under the SPF, messages that do not come directly from the return paths designated outbound servers we consider as forged. This semantic is compatible with existing practices, with two exceptions; web-generated email and verbatim forwarding. Those two cases should implement SRS for best results.<\/p>\n<figure id=\"attachment_15905\" aria-describedby=\"caption-attachment-15905\" style=\"width: 420px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-15905\" title=\"Sender Policy Framework (SPFbis)\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/02\/spf3.png\" alt=\"Sender-Policy-Framework-SPFbis\" width=\"420\" height=\"315\" \/><figcaption id=\"caption-attachment-15905\" class=\"wp-caption-text\">Fig 2. Sender Policy Framework (SPFbis)<\/figcaption><\/figure>\n<p><strong>DKIM<\/strong> \u2013 DomainKeys Identified Mail (DKIM) is a protocol that permits a person, role, or organization that possesses ownership of a signing domain to claim some responsibility for a message via associating the domain with the message. This is an important authentication mechanism to help protect both email receivers and email senders from forged and phishing emails. Forged email is a serious threat to all parties in an email exchange. Our wizard for <a href=\"https:\/\/easydmarc.com\/tools\/dkim-lookup\" target=\"_blank\" rel=\"noopener\">DKIM configuration and checks is here<\/a>.<\/p>\n<figure id=\"attachment_15955\" aria-describedby=\"caption-attachment-15955\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-15955\" title=\"The Domain-based Keys Identified Mails (DKIM)\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/DMARC-flow.png\" alt=\"The-Domain-based-Keys-Identified-Mails-DKIM-\" width=\"474\" height=\"270\" \/><figcaption id=\"caption-attachment-15955\" class=\"wp-caption-text\">Fig 3. The Domain-based Keys Identified Mails (DKIM)<\/figcaption><\/figure>\n<h3>What is DMARC<\/h3>\n<p><span style=\"font-weight: 400;\">Before going any further, let&#8217;s understand <a href=\"https:\/\/easydmarc.com\/blog\/what-is-dmarc-overview\/\" target=\"_blank\" rel=\"noopener\">what is dmarc<\/a>. A Domain-based Message Authentication Reporting and Conformance or DMARC is an <\/span>email validation<span style=\"font-weight: 400;\"> and reporting protocol which helps You <\/span>protect Your email infrastructure from spoofing or phishing attacks.<b>\u00a0<\/b><span style=\"font-weight: 400;\">DMARC meets Your organization\u2019s inbound email authentication needs. <\/span><span style=\"font-weight: 400;\">DMARC is based on two <\/span><a href=\"https:\/\/easydmarc.com\/blog\/active-campaign-spf-dkim-setup\/\">SPF and DKIM<\/a><span style=\"font-weight: 400;\"> basic protocols which let a receiver and a sender to cooperate with each other in order to <a href=\"https:\/\/easydmarc.com\/blog\/ovhcloud-spf-and-dkim-configuration\/\">authenticate emails<\/a> by sender SPF and a receivers DKIM.<\/span><\/p>\n<h3>What is EasyDMARC Trust?<\/h3>\n<p><span style=\"font-weight: 400;\">With <\/span>DMARC TRUST tools\u00a0<span style=\"font-weight: 400;\">You will protect Your receivers email infrastructure from spoofed messages, in contrast with this, you will protect Your domain from illegitimate usage and spam content being sent on Your behalf.\u00a0<\/span><\/p>\n<p>The goal of DMARC is to build on this system of senders and receivers collaborating to improve mail authentication practices of senders and enable receivers to reject unauthenticated messages. We have very useful tools and reporting mechanisms for the DMARC. <a href=\"https:\/\/easydmarc.com\/tools\/dmarc-lookup\" target=\"_blank\" rel=\"noopener\"><strong>Check them here.<\/strong><\/a> DMARC determines the real or not legitimate email sources. So if the message doesn&#8217;t pass DMARC authentification can handle the \u201cnon-aligned\u201d messages fates. For example, in a scenario where a receiver deploys <a href=\"https:\/\/easydmarc.com\/blog\/sparkpost-spf-and-dkim-setup-step-by-step\/\" target=\"_blank\" rel=\"noopener\">SPF and DKIM<\/a>, plus its own spam filters, the flow is likely to result as shown:<\/p>\n<figure id=\"attachment_15955\" aria-describedby=\"caption-attachment-15955\" style=\"width: 444px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15955\" title=\"DMARC\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/DMARC-flow.png\" alt=\"What-is-EasyDMARC-Trust\" width=\"444\" height=\"253\" \/><figcaption id=\"caption-attachment-15955\" class=\"wp-caption-text\">DMARC<\/figcaption><\/figure>\n<h3>Anatomy of a DMARC Resource Record in the DNS<\/h3>\n<p><a href=\"https:\/\/easydmarc.com\/blog\/dmarc-policy-overrides\/\" target=\"_blank\" rel=\"noopener\">DMARC policies<\/a> are published in the DNS as text (TXT) resource records (RR). As stated earlier, they announce what an email receiver should do with the non-aligned mail it receives.<br \/>\nConsider an example DMARC TXT RR for the domain \u201csender.easydmarc.com\u201d that reads:<br \/>\n&#8220;v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@easydmarc.com&#8221;<\/p>\n<h2>How Senders Deploy DMARC in 5-Easy Steps<\/h2>\n<p>DMARC is based on real-world experience by some of the world\u2019s largest email senders and receivers <a href=\"https:\/\/easydmarc.com\/blog\/neostrada-spf-and-dkim-configuration\/\">deploying SPF and DKIM<\/a>. The specification takes into account the fact that it is nearly impossible for an organization to flip a switch to production. There are a number of built-in methods for \u201cthrottling\u201d the DMARC processing so that all parties can ease into full deployment over time.<\/p>\n<ul>\n<li>Deploy DKIM &amp; SPF. You have to cover the basics, first.<\/li>\n<li>Ensure that your mailers are correctly aligning the appropriate identifiers.<\/li>\n<li>Publish a DMARC record with the \u201cnone\u201d flag set for the policies, which requests data reports.<\/li>\n<li>Analyze the data and modify your mail streams as appropriate.<\/li>\n<li>Modify your DMARC policy flags from \u201cnone\u201d to \u201cquarantine\u201d to \u201creject\u201d as you gain experience.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In order to successfully add OpenDKIM to DNS &#8230;<\/p>\n","protected":false},"author":1,"featured_media":31946,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[205,209],"tags":[],"class_list":["post-15978","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge-base","category-source-configuration"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Postfix DKIM and SPF Setup | EasyDMARC<\/title>\n<meta name=\"description\" content=\"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM &amp; SPF. Second, add a DMARC record. Read for more steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Postfix DKIM and SPF Setup for OpenDKIM on Linux\" \/>\n<meta property=\"og:description\" content=\"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM &amp; SPF. Second, add a DMARC record. Read for more steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/\" \/>\n<meta property=\"og:site_name\" content=\"EasyDMARC\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/EasyDMARC\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-09T18:07:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-30T11:30:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"910\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"EasyDMARC\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@easydmarc\" \/>\n<meta name=\"twitter:site\" content=\"@easydmarc\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"EasyDMARC\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/\"},\"author\":{\"name\":\"EasyDMARC\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/person\\\/449261e9810b270cc697c7c9c5b89e97\"},\"headline\":\"Postfix DKIM and SPF Setup for OpenDKIM on Linux\",\"datePublished\":\"2018-04-09T18:07:12+00:00\",\"dateModified\":\"2025-07-30T11:30:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/\"},\"wordCount\":1390,\"publisher\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg\",\"articleSection\":[\"Knowledge Base\",\"Source Configuration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/\",\"name\":\"Postfix DKIM and SPF Setup | EasyDMARC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg\",\"datePublished\":\"2018-04-09T18:07:12+00:00\",\"dateModified\":\"2025-07-30T11:30:42+00:00\",\"description\":\"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM & SPF. Second, add a DMARC record. Read for more steps.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#primaryimage\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg\",\"contentUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg\",\"width\":1440,\"height\":910,\"caption\":\"How to add OpenDKIM to DNS on Linux for Postfix 1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/how-to-add-opendkim-to-dns-on-linux-postfix\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/category\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Source Configuration\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/category\\\/knowledge-base\\\/source-configuration\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Postfix DKIM and SPF Setup for OpenDKIM on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/\",\"name\":\"EasyDMARC\",\"description\":\"Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/#organization\",\"name\":\"EasyDMARC\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/img\\\/logo.png\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/EasyDMARC\\\/\",\"https:\\\/\\\/x.com\\\/easydmarc\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/easydmarc\\\/mycompany\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/person\\\/449261e9810b270cc697c7c9c5b89e97\",\"name\":\"EasyDMARC\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g\",\"caption\":\"EasyDMARC\"},\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/author\\\/easydmarc\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Postfix DKIM and SPF Setup | EasyDMARC","description":"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM & SPF. Second, add a DMARC record. Read for more steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/","og_locale":"en_US","og_type":"article","og_title":"Postfix DKIM and SPF Setup for OpenDKIM on Linux","og_description":"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM & SPF. Second, add a DMARC record. Read for more steps.","og_url":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/","og_site_name":"EasyDMARC","article_publisher":"https:\/\/www.facebook.com\/EasyDMARC\/","article_published_time":"2018-04-09T18:07:12+00:00","article_modified_time":"2025-07-30T11:30:42+00:00","og_image":[{"width":1440,"height":910,"url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","type":"image\/jpeg"}],"author":"EasyDMARC","twitter_card":"summary_large_image","twitter_creator":"@easydmarc","twitter_site":"@easydmarc","twitter_misc":{"Written by":"EasyDMARC","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#article","isPartOf":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/"},"author":{"name":"EasyDMARC","@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/person\/449261e9810b270cc697c7c9c5b89e97"},"headline":"Postfix DKIM and SPF Setup for OpenDKIM on Linux","datePublished":"2018-04-09T18:07:12+00:00","dateModified":"2025-07-30T11:30:42+00:00","mainEntityOfPage":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/"},"wordCount":1390,"publisher":{"@id":"https:\/\/easydmarc.com\/blog\/#organization"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#primaryimage"},"thumbnailUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","articleSection":["Knowledge Base","Source Configuration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/","url":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/","name":"Postfix DKIM and SPF Setup | EasyDMARC","isPartOf":{"@id":"https:\/\/easydmarc.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#primaryimage"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#primaryimage"},"thumbnailUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","datePublished":"2018-04-09T18:07:12+00:00","dateModified":"2025-07-30T11:30:42+00:00","description":"This step by step guide will help you\u00a0add OpenDKIM to DNS on Linux for postfix. First, Deploy DKIM & SPF. Second, add a DMARC record. Read for more steps.","breadcrumb":{"@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#primaryimage","url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","contentUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","width":1440,"height":910,"caption":"How to add OpenDKIM to DNS on Linux for Postfix 1"},{"@type":"BreadcrumbList","@id":"https:\/\/easydmarc.com\/blog\/how-to-add-opendkim-to-dns-on-linux-postfix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/easydmarc.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/easydmarc.com\/blog\/category\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"Source Configuration","item":"https:\/\/easydmarc.com\/blog\/category\/knowledge-base\/source-configuration\/"},{"@type":"ListItem","position":4,"name":"Postfix DKIM and SPF Setup for OpenDKIM on Linux"}]},{"@type":"WebSite","@id":"https:\/\/easydmarc.com\/blog\/#website","url":"https:\/\/easydmarc.com\/blog\/","name":"EasyDMARC","description":"Blog","publisher":{"@id":"https:\/\/easydmarc.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/easydmarc.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/easydmarc.com\/#organization","name":"EasyDMARC","url":"https:\/\/easydmarc.com\/","logo":{"@type":"ImageObject","url":"https:\/\/easydmarc.com\/img\/logo.png"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/EasyDMARC\/","https:\/\/x.com\/easydmarc","https:\/\/www.linkedin.com\/company\/easydmarc\/mycompany\/"]},{"@type":"Person","@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/person\/449261e9810b270cc697c7c9c5b89e97","name":"EasyDMARC","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fcbf1ca829f8e0977fce524da20caa8a528368d0909ce48741526046e5113259?s=96&r=g","caption":"EasyDMARC"},"url":"https:\/\/easydmarc.com\/blog\/author\/easydmarc\/"}]}},"jetpack_featured_media_url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-add-OpenDKIM-to-DNS-on-Linux-for-Postfix-1.jpg","_links":{"self":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/15978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/comments?post=15978"}],"version-history":[{"count":4,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/15978\/revisions"}],"predecessor-version":[{"id":50016,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/15978\/revisions\/50016"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/media\/31946"}],"wp:attachment":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/media?parent=15978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/categories?post=15978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/tags?post=15978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}