{"id":760,"date":"2012-09-30T09:06:06","date_gmt":"2012-09-30T09:06:06","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=760"},"modified":"2022-06-03T03:52:26","modified_gmt":"2022-06-03T08:52:26","slug":"install-and-configure-opendkim-on-debian-squeeze","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/","title":{"rendered":"Install and Configure openDKIM on Debian Squeeze"},"content":{"rendered":"
<\/div>

Installing and Configuring openDKIM on Debian<\/p>\n

This guide will show you how to install and configure openDKIM on a Debian Squeeze VPS<\/a>. DKIM is a signature\/cryptography email authentication technology used to validate that a message was sent by an authorized source. DKIM allows an organization to take responsibility for transmitting a message, in a way that can be verified by a recipient. More information can be found at the official DKIM web site.<\/p>\n

<\/p>\n

Install openDKIM<\/p>\n

aptitude install opendkim<\/pre>\n

Create a new directory for your key<\/p>\n

mkdir \/etc\/opendkim\/keys\/your-domain.com<\/pre>\n

Generate singing keys<\/p>\n

opendkim-genkey -D \/etc\/opendkim\/keys\/your-domain.com -d your-domain.com -s mail<\/pre>\n

The above command will create two files under the newly created directory – mail.private and mail.txt<\/p>\n

Change the ownership to opendkim<\/p>\n

chown -R opendkim:opendkim \/etc\/opendkim\/keys\/your-domain.com<\/pre>\n

Open the openDKIM configuration file \/etc\/opendkim.conf , delete everything and add the following<\/p>\n

PidFile \/var\/run\/opendkim\/opendkim.pid\nMode    sv\nSyslog  yes\nSyslogSuccess   yes\nLogWhy  yes\nUserID  opendkim:opendkim\nSocket  inet:8891@localhost\nUmask   002\nCanonicalization        relaxed\/simple\nSelector        mail\nKeyFile \/etc\/opendkim\/keys\/your-domain.com\/mail.private\nKeyTable        \/etc\/opendkim\/KeyTable\nSigningTable    \/etc\/opendkim\/SigningTable<\/pre>\n

Open \/etc\/opendkim\/KeyTable (list of keys available for signing) and add the following line<\/p>\n

mail._domainkey.your-domain.com your-domain.com:mail:\/etc\/opendkim\/keys\/your-domain.com\/mail.private<\/pre>\n

Open \/etc\/opendkim\/SigningTable and add the following line<\/p>\n

your-domain.com mail._domainkey.your-domain.com<\/pre>\n

Open \/etc\/opendkim\/TrustedHosts and add the following lines<\/p>\n

127.0.0.1\nlocalhost\nyour-domain.com<\/pre>\n

Add the content of the \/etc\/opendkim\/keys\/your-domain.com\/mail.txt file to your DNS zone file<\/p>\n

mail._domainkey IN TXT \"v=DKIM1; g=*; k=rsa; p=MIG.......B58FQIDAQAB\" ; ----- DKIM mail for your-domain.com<\/pre>\n

Open the postfix configuration file (\/etc\/postfix\/main.cf) and add the following lines<\/p>\n

smtpd_milters           = inet:127.0.0.1:8891\nnon_smtpd_milters       = $smtpd_milters\nmilter_default_action   = accept\nmilter_protocol   = 2<\/pre>\n

Restart both openDKIM and postfix<\/p>\n

\/etc\/init.d\/opendkim restart\n\/etc\/init.d\/postfix restart<\/pre>\n

To check if everything works as expected send an email to check-auth@verifier.port25.com. In a few seconds you will get an email as follows<\/p>\n

====================================\nSummary of Results\n====================================\nSPF check:          pass\nDomainKeys check:   pass\nDKIM check:         pass\nSender-ID check:    pass\nSpamAssassin check: ham<\/pre>\n

The line “DKIM check: pass” means that you have successfully installed openDKIM on your sever.<\/p>\n

PS.<\/strong><\/span> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"

Installing and Configuring openDKIM on Debian This guide will show you how to install and configure openDKIM on a Debian … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,1706,1703,13],"tags":[48,126,127,125,1152],"yoast_head":"\nInstall and Configure openDKIM on Debian Squeeze - RoseHosting<\/title>\n<meta name=\"description\" content=\"Install and Configure openDKIM on Debian Squeeze - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install and Configure openDKIM on Debian Squeeze - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Install and Configure openDKIM on Debian Squeeze - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-30T09:06:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:52:26+00:00\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Install and Configure openDKIM on Debian Squeeze\",\"datePublished\":\"2012-09-30T09:06:06+00:00\",\"dateModified\":\"2022-06-03T08:52:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\"},\"wordCount\":270,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"keywords\":[\"debian\",\"dkim\",\"email\",\"opendkim\",\"rosehosting\"],\"articleSection\":[\"Debian\",\"Email Servers\",\"Security\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\",\"name\":\"Install and Configure openDKIM on Debian Squeeze - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"datePublished\":\"2012-09-30T09:06:06+00:00\",\"dateModified\":\"2022-06-03T08:52:26+00:00\",\"description\":\"Install and Configure openDKIM on Debian Squeeze - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install and Configure openDKIM on Debian Squeeze\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","description":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","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:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/","og_locale":"en_US","og_type":"article","og_title":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","og_description":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2012-09-30T09:06:06+00:00","article_modified_time":"2022-06-03T08:52:26+00:00","author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Install and Configure openDKIM on Debian Squeeze","datePublished":"2012-09-30T09:06:06+00:00","dateModified":"2022-06-03T08:52:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/"},"wordCount":270,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"keywords":["debian","dkim","email","opendkim","rosehosting"],"articleSection":["Debian","Email Servers","Security","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/","url":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/","name":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"datePublished":"2012-09-30T09:06:06+00:00","dateModified":"2022-06-03T08:52:26+00:00","description":"Install and Configure openDKIM on Debian Squeeze - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/install-and-configure-opendkim-on-debian-squeeze\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install and Configure openDKIM on Debian Squeeze"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/760"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":2,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":37333,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/760\/revisions\/37333"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}