{"id":3141,"date":"2025-10-11T16:55:19","date_gmt":"2025-10-11T07:55:19","guid":{"rendered":"https:\/\/weblog.hirohiro716.com\/?p=3141"},"modified":"2025-10-22T14:22:43","modified_gmt":"2025-10-22T05:22:43","slug":"almalinux9%e3%81%aepostfix%e3%81%a7e%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92dkim%e3%81%a7%e9%80%81%e4%bf%a1%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/weblog.hirohiro716.com\/?p=3141","title":{"rendered":"AlmaLinux9\u306ePostfix\u3067E\u30e1\u30fc\u30eb\u3092DKIM\u3067\u9001\u4fe1\u3059\u308b"},"content":{"rendered":"<p>\u3053\u306e<a href=\"\/?p=2046\">\u8a18\u4e8b<\/a>\u3068\u540c\u3058\u624b\u9806\u3067\u8a2d\u5b9a\u3057\u305fPostfix\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: \u74b0\u5883; notranslate\" title=\"\u74b0\u5883\">\r\nAlmaLinux release 9.6 (Sage Margay)\r\npostfix 3.5.25\r\nopendkim 2.11.0\r\n<\/pre>\n<p>EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# dnf install epel-release\r\n<\/pre>\n<p>CRB\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u5316\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# dnf config-manager --set-enabled crb\r\n<\/pre>\n<p>\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# dnf install opendkim\r\n# dnf install opendkim-tools\r\n<\/pre>\n<p>\u9375\u3092\u683c\u7d0d\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# cd \/etc\/opendkim\/keys\/\r\n# mkdir hirohiro716.com alias.hirohiro716.com\r\n# chmod 750 *\r\n<\/pre>\n<p>\u9375\u3092\u4f5c\u6210\u3059\u308b\u3002&#8211;selector\u30aa\u30d7\u30b7\u30e7\u30f3\u306f1\u3064\u306e\u30c9\u30e1\u30a4\u30f3\u306b\u8907\u6570\u306e\u9375\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3092\u9664\u304d\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# opendkim-genkey -D \/etc\/opendkim\/keys\/hirohiro716.com\/ -d hirohiro716.com\r\n# opendkim-genkey -D \/etc\/opendkim\/keys\/alias.hirohiro716.com\/ -d alias.hirohiro716.com\r\n# chown -R opendkim:opendkim \/etc\/opendkim\/keys\/\r\n<\/pre>\n<p>\u4f5c\u6210\u3055\u308c\u305fdefault.txt\u3092\u53c2\u8003\u306bDNS\u30ec\u30b3\u30fc\u30c9\u3092\u767b\u9332\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndefault._domainkey.hirohiro716.com TXT 0 v=DKIM1; k=rsa; p=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\n_adsp._domainkey.hirohiro716.com TXT 0 dkim=unknown\r\ndefault._domainkey.alias.hirohiro716.com TXT 0 v=DKIM1; k=rsa; p=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n_adsp._domainkey.alias.hirohiro716.com TXT 0 dkim=unknown\r\n<\/pre>\n<p>opendkim\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3002<br \/>\n\u203b\u5909\u66f4\u7b87\u6240\u306e\u307f\u8a18\u8f09<\/p>\n<pre class=\"brush: plain; title: \/etc\/opendkim.conf; notranslate\" title=\"\/etc\/opendkim.conf\">\r\nMode  sv\r\nSoftwareHeader  no\r\nKeyTable  \/etc\/opendkim\/KeyTable\r\nSigningTable  refile:\/etc\/opendkim\/SigningTable\r\n<\/pre>\n<p>KeyTable\u3092\u5909\u66f4\u3057\u3066\u4f7f\u7528\u3059\u308b\u79d8\u5bc6\u9375\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: \/etc\/opendkim\/KeyTable; notranslate\" title=\"\/etc\/opendkim\/KeyTable\">\r\ndefault._domainkey.hirohiro716.com hirohiro716.com:default:\/etc\/opendkim\/keys\/hirohiro716.com\/default.private\r\ndefault._domainkey.alias.hirohiro716.com alias.hirohiro716.com:default:\/etc\/opendkim\/keys\/alias.hirohiro716.com\/default.private\r\n<\/pre>\n<p>SigningTable\u3092\u5909\u66f4\u3057\u3066\u7f72\u540d\u3059\u308b\u30c9\u30e1\u30a4\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: \/etc\/opendkim\/SigningTable; notranslate\" title=\"\/etc\/opendkim\/SigningTable\">\r\n*@hirohiro716.com default._domainkey.hirohiro716.com\r\n*@alias.hirohiro716.com default._domainkey.alias.hirohiro716.com\r\n<\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u5316\u3057\u3066\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# systemctl enable --now opendkim\r\n<\/pre>\n<p>Postfix\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u4e0b\u90e8\u306b\u4e0b\u8a18\u3092\u8ffd\u8a18\u3059\u308b\u3002AlmaLinux9\u304b\u3089\u306f\u30ed\u30fc\u30ab\u30ebUNIX\u30bd\u30b1\u30c3\u30c8\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u306a\u3063\u305f\u3089\u3057\u3044\u3002<\/p>\n<pre class=\"brush: plain; title: \/etc\/postfix\/main.cf; notranslate\" title=\"\/etc\/postfix\/main.cf\">\r\n# DKIM settings.\r\nsmtpd_milters = local:\/run\/opendkim\/opendkim.sock\r\nnon_smtpd_milters = $smtpd_milters\r\nmilter_default_action = accept\r\n<\/pre>\n<p>opendkim.sock\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081postfix\u3092opendkim\u30b0\u30eb\u30fc\u30d7\u306b\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# gpasswd opendkim -a postfix\r\n<\/pre>\n<p>Postfix\u306e\u8a2d\u5b9a\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# systemctl reload postfix\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3068\u540c\u3058\u624b\u9806\u3067\u8a2d\u5b9a\u3057\u305fPostfix\u3092\u4f7f\u7528\u3059\u308b\u3002 AlmaLinux release 9.6 (Sage Margay) postfix 3.5.25 opendkim 2.11.0 EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-3141","post","type-post","status-publish","format-standard","hentry","category-almalinux"],"views":317,"_links":{"self":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/3141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3141"}],"version-history":[{"count":6,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/3141\/revisions"}],"predecessor-version":[{"id":3153,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/3141\/revisions\/3153"}],"wp:attachment":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}