{"id":928,"date":"2017-03-31T18:22:23","date_gmt":"2017-03-31T16:22:23","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=928"},"modified":"2017-03-31T18:22:23","modified_gmt":"2017-03-31T16:22:23","slug":"opendkim-with-postfix-centos-7","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=928","title":{"rendered":"OpenDKIM with Postfix (Centos 7)"},"content":{"rendered":"<p>\n\tFirst install OpenDKIM:\n<\/p>\n<pre>\n# yum install opendkim<\/pre>\n<p>\n\tConfigure OpenDKIM (please read the comments inside the original config file):\n<\/p>\n<pre>\n# vim \/etc\/opendkim.conf\n\nPidFile \/var\/run\/opendkim\/opendkim.pid\nMode    sv\nSyslog  yes\nSyslogSuccess   yes\nLogWhy  yes\nUserID  opendkim:opendkim\nSocket  inet:8891@localhost\nUmask   002\nSendReports     yes\nSoftwareHeader  yes\nCanonicalization        relaxed\/simple\nSelector        default\nMinimumKeyBits  1024\nKeyTable        \/etc\/opendkim\/KeyTable\nSigningTable    refile:\/etc\/opendkim\/SigningTable\nExternalIgnoreList      refile:\/etc\/opendkim\/TrustedHosts\nInternalHosts   refile:\/etc\/opendkim\/TrustedHosts\nOversignHeaders From\nSignatureAlgorithm      rsa-sha256<\/pre>\n<p>\n\tGenerate a domain key + domain cert:\n<\/p>\n<pre>\n# cd \/etc\/opendkim\/keys\n# opendkim-genkey -d mydomain.com\n# mv default.private mydomain.private\n# mv default.txt mydomain.txt\n# chown opendkim:opendkim mydomain.*<\/pre>\n<p>\n\tAdd the key to the keytable:\n<\/p>\n<pre>\n# vim \/etc\/opendkim\/KeyTable\n&gt;&gt; default._domainkey.mydomain.com mydomain.com:default:\/etc\/opendkim\/keys\/mydomain.private<\/pre>\n<p>\n\tAdd the cert to the SignTable\n<\/p>\n<pre>\n# vim \/etc\/opendkim\/SignTable\n&gt;&gt; *@mydomain.com default._domainkey.mydomain.com<\/pre>\n<p>\n\tEdit postfix config and add OpenDKIM to the milters:\n<\/p>\n<pre>\n# vim \/etc\/postfix\/main.cf\n&gt;&gt; smtpd_milters = inet:localhost:8891\n&gt;&gt; non_smtpd_milters = inet:localhost:8891<\/pre>\n<p>\n\tStart OpenDKIM:\n<\/p>\n<pre>\n# systemctl start opendkim\n# systemctl enable opendkim<\/pre>\n<p>\n\tRestart postfix:\n<\/p>\n<pre>\n# systemctl restart postfix<\/pre>\n<p>\n\tAdd DKIM TXT record to DNS (Bind9):\n<\/p>\n<pre>\n# vim \/var\/named\/mydomain.com\n&gt;&gt; default._domainkey.mydomain.com. 3600      TXT        &quot;v=DKIM1; k=rsa; p=&lt;very long string taken from \/etc\/opendkim\/keys\/mydomain.txt&gt;&quot;<\/pre>\n<p>\n\tRestart Bind:\n<\/p>\n<pre>\n# systemctl restart named<\/pre>\n<p>\n\tWell, that should be it, wokring DKIM on your mydomain.com!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First install OpenDKIM: # yum install opendkim Configure OpenDKIM (please read the comments inside the original config file): # vim \/etc\/opendkim.conf PidFile \/var\/run\/opendkim\/opendkim.pid Mode sv Syslog yes SyslogSuccess yes LogWhy yes UserID opendkim:opendkim Socket inet:8891@localhost Umask 002 SendReports yes SoftwareHeader yes Canonicalization relaxed\/simple Selector default MinimumKeyBits 1024 KeyTable \/etc\/opendkim\/KeyTable SigningTable refile:\/etc\/opendkim\/SigningTable ExternalIgnoreList refile:\/etc\/opendkim\/TrustedHosts InternalHosts refile:\/etc\/opendkim\/TrustedHosts [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-928","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=928"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/928\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}