{"id":311,"date":"2019-11-25T22:44:02","date_gmt":"2019-11-25T13:44:02","guid":{"rendered":"https:\/\/vicsfactory.com\/?p=311"},"modified":"2019-11-29T17:34:17","modified_gmt":"2019-11-29T08:34:17","slug":"%e3%82%b9%e3%83%91%e3%83%a0%e3%83%a1%e3%83%bc%e3%83%ab%e5%88%a4%e5%ae%9a%e5%af%be%e7%ad%96%ef%bc%88dkim%ef%bc%86spf%ef%bc%89","status":"publish","type":"post","link":"https:\/\/vicsfactory.com\/?p=311","title":{"rendered":"\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u5224\u5b9a\u5bfe\u7b56\uff08DKIM\uff06SPF\u306e\u5c0e\u5165\uff09"},"content":{"rendered":"\n<p>\u3000<\/p>\n\n\n\n<p>\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u306ePostfix\u304b\u3089GMAIL\u5b9b\u3066\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3068\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u5224\u5b9a\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001DKIM\u3068SPF\u3092\u5c0e\u5165\u3057\u3066\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u5224\u5b9a\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u203b\u4e8b\u524d\u306bEPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5c0e\u5165\u3057\u3066\u304a\u304f<\/p>\n\n\n\n<p>\u25cfopendkim\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br># yum -y install opendkim<\/p>\n\n\n\n<p>\u25cf\u30ad\u30fc\u30da\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u4fdd\u5b58\u5834\u6240\u4f5c\u6210<br># mkdir \/etc\/opendkim\/keys\/sample.com<\/p>\n\n\n\n<p>\u25cf\u30ad\u30fc\u30da\u30a2\uff08\u516c\u958b\u9375\u30fb\u79d8\u5bc6\u9375\uff09\u4f5c\u6210<br># opendkim-genkey -D \/etc\/opendkim\/keys\/sample.com\/ -d sample.com -s 191001<br>\u203b-s \u306f\u30bb\u30ec\u30af\u30bf\u540d\uff08\u65e5\u4ed8\u7b49\u3001\u81ea\u5206\u304c\u5206\u304b\u308c\u3070\u4f55\u3067\u3082\u53ef\uff09<\/p>\n\n\n\n<p>\u25cf\u30ad\u30fc\u30da\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u8005\u5909\u66f4<br># chown -R opendkim:opendkim \/etc\/opendkim\/keys\/sample.com\/<\/p>\n\n\n\n<p>\u25cf\u516c\u958b\u9375\u306e\u78ba\u8a8d<br>\u30fb\u516c\u958b\u9375\uff08\/etc\/opendkim\/keys\/sample.com\/191001.txt\uff09\u3092FTP\u7b49\u3067DL\u3057\u3066\u4e2d\u8eab\u3092\u78ba\u8a8d<br>191001.txt\u306e\u5185\u5bb9\uff08\u4f8b\uff09<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br>191001._domainkey    IN  TXT ( &#8220;v=DKIM1; k=rsa; &#8220;<br>&#8220;p=******************************************************************************<br>*********************************************************************************<br>**************************************&#8221; )  ; &#8212;&#8211; DKIM key 191001 for sample.com<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<p>\u25cfDNS\u30b5\u30fc\u30d0\u30fc\u3078\u306eDKIM\u767b\u9332<br>\u4f8b\uff1aValueDomain\u306e\u5834\u5408<br>\u30db\u30b9\u30c8\u540d\uff1a 191001._domainkey <br>\u30bf\u30fc\u30b2\u30c3\u30c8\uff1av=DKIM1; k=rsa; p=**************************************<br>\u30bf\u30a4\u30d7\uff1aTXT<\/p>\n\n\n\n<p>\u25cfDNS\u30b5\u30fc\u30d0\u30fc\u3078\u306eSPF\u767b\u9332<br>\u4f8b\uff1aValuedomain\u306e\u5834\u5408<br>\u30db\u30b9\u30c8\u540d\uff1a\uff20<br>\u30bf\u30fc\u30b2\u30c3\u30c8\uff1av=spf1 a:sample.com ~all<br>\u30bf\u30a4\u30d7\uff1aTXT<br>\u203bSPF\u306e\u8a2d\u5b9a\u306f\u3053\u306eDNS\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u767b\u9332\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u25cfKeyTable\u306e\u8a2d\u5b9a<br># vi \/etc\/opendkim\/KeyTable<br>\u4e0b\u8a18\u3092\u8ffd\u8a18<br> 191001._domainkey.sample.com sample.com:191001:\/etc\/opendkim\/keys\/sample.com\/191001.private<\/p>\n\n\n\n<p>\u25cfSigningTable\u306e\u8a2d\u5b9a<br># vi \/etc\/opendkim\/SigningTable<br>\u4e0b\u8a18\u3092\u8ffd\u8a18<br> *@sample.com 191001._domainkey.sample.com<\/p>\n\n\n\n<p>\u25cfopendkim\u306e\u8a2d\u5b9a<br># vi \/etc\/opendkim.conf<br>\u4e0b\u8a18\u90e8\u5206\u3092\u5909\u66f4<br>Mode&nbsp;&nbsp;&nbsp;&nbsp;v<br>&nbsp;\u2193s\u3092\u8ffd\u8a18<br>Mode&nbsp;&nbsp; sv<br>KeyFile   \/etc\/opendkim\/keys\/default.private<br>&nbsp;\u2193\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8<br>#KeyFile   \/etc\/opendkim\/keys\/default.private<br># KeyTable   \/etc\/opendkim\/KeyTable<br>&nbsp;\u2193\u30b3\u30e1\u30f3\u30c8\u524a\u9664<br>KeyTable   \/etc\/opendkim\/KeyTable<br># SigningTable&nbsp;&nbsp;refile:\/etc\/opendkim\/SigningTable<br>&nbsp;\u2193\u30b3\u30e1\u30f3\u30c8\u524a\u9664<br>SigningTable&nbsp;&nbsp; refile:\/etc\/opendkim\/SigningTable<br># ExternalIgnoreList&nbsp;&nbsp;&nbsp;&nbsp;refile:\/etc\/opendkim\/TrustedHosts<br>&nbsp;\u2193\u30b3\u30e1\u30f3\u30c8\u524a\u9664<br>ExternalIgnoreList&nbsp;&nbsp;&nbsp;&nbsp; refile:\/etc\/opendkim\/TrustedHosts<br># InternalHosts refile:\/etc\/opendkim\/TrustedHosts<br>&nbsp;\u2193\u30b3\u30e1\u30f3\u30c8\u524a\u9664<br>InternalHosts&nbsp;&nbsp;refile:\/etc\/opendkim\/TrustedHosts <\/p>\n\n\n\n<p>\u25cfopendkim\u518d\u8d77\u52d5<br># systemctl restart opendkim<br># systemctl enable opendkim<\/p>\n\n\n\n<p>\u25cfpostfix\u306e\u8a2d\u5b9a<br># vi \/etc\/postfix\/main.cf<br>\u6700\u4e0b\u884c\u306b\u4e0b\u8a18\u3092\u8ffd\u8a18<br># DKIM<br>smtpd_milters = inet:127.0.0.1:8891<br>non_smtpd_milters = $smtpd_milters<br>milter_default_action = accept<\/p>\n\n\n\n<p>\u25cf\u8a2d\u5b9a\u53cd\u6620<br># systemctl restart postfix<\/p>\n\n\n\n<p>\u25cf\u52d5\u4f5c\u78ba\u8a8d<br>GMAIL\u5b9b\u3066\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3001\u53d7\u4fe1\u30e1\u30fc\u30eb\u306e\u30d8\u30c3\u30c0\u30fc\u90e8\u5206\u306bdkim=pass, spf=pass\u306e\u8a18\u8ff0\u304c\u3042\u308c\u3070\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u3002<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br>Authentication-Results<br>mx.google.com; dkim=pass header.i=@sample.com header.s=191001 header.b=aAbBcCdD; spf=pass (google.com: domain of user@sample.com designates &#8220;\u30b5\u30fc\u30d0\u30fcIP\u30a2\u30c9\u30ec\u30b9&#8221; as permitted sender) smtp.mailfrom=user@sample.com<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p>\u3000<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000 \u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u306ePostfix\u304b\u3089GMAIL\u5b9b\u3066\u306b\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3068\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u5224\u5b9a\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001DKIM\u3068SPF\u3092\u5c0e\u5165\u3057\u3066\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u5224\u5b9a\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002 \u203b\u4e8b\u524d\u306bEPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5c0e\u5165\u3057\u3066\u304a\u304f  &hellip; <a href=\"https:\/\/vicsfactory.com\/?p=311\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/311"}],"collection":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":9,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions\/325"}],"wp:attachment":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}