{"id":3678,"date":"2023-06-09T22:30:29","date_gmt":"2023-06-09T13:30:29","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=3678"},"modified":"2024-01-19T18:57:07","modified_gmt":"2024-01-19T09:57:07","slug":"post-3678","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/3678","title":{"rendered":"CentOS7.9\u306bPostfix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u672c\u30d6\u30ed\u30b0\u306e\u30b5\u30fc\u30d0\u3092<a href=\"https:\/\/taitan916.info\/blog\/archives\/3418\" target=\"_blank\" rel=\"noopener\">KAGOYA\u306eVPS\u304b\u3089WebARENA Indigo\u3078\u79fb\u884c<\/a>\u3057\u305f\u969b\u306b\u3001\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3082\u8a2d\u7f6e\u3057\u3066\u307f\u305f\u3082\u306e\u306e\u6b63\u5e38\u306b\u9001\u4fe1\u3055\u308c\u306a\u304b\u3063\u305f\u3002\u305d\u306e\u307e\u307e\u653e\u7f6e\u3057\u3066\u3044\u305f\u3082\u306e\u306e\u4eca\u306b\u306a\u3063\u3066\u8a2d\u5b9a\u7b49\u3092\u5f04\u3063\u3066\u307f\u308b\u3068\u9001\u4fe1\u3067\u304d\u305f\u306e\u3067\u899a\u3048\u3066\u3044\u308b\u7bc4\u56f2\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5\u306e\u30e1\u30e2\u3002\u5c1a\u3001PHP\u7b49\u304b\u3089\u306e\u9001\u4fe1\u306e\u307f\u304c\u76ee\u7684\u3067\u53d7\u4fe1\u306b\u95a2\u3057\u3066\u306f\u53d6\u308a\u6271\u3063\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>CentOS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/h2>\n<p>7.9.2009<\/p>\n<p>&nbsp;<\/p>\n<h2>Postfix\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ca\u3073\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>\u30b5\u30fc\u30d0\u306bSSH\u63a5\u7d9a\u3057\u4ee5\u4e0b\u64cd\u4f5c\u3092\u884c\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Postfix\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\nyum -y install postfix\r\n\r\n#Postfix\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\r\npostconf | grep mail_version\r\n\r\n#\u4ee5\u4e0b\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u51fa\u529b\u3055\u308c\u305f\r\nmail_version = 2.10.1\r\n\r\n#\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u4f5c\u6210\r\ncp \/etc\/postfix\/main.cf \/etc\/postfix\/main.cf.org\r\n\r\n#\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\r\nvi \/etc\/postfix\/main.cf<\/pre>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3082\u3057\u304f\u306f\u66f8\u304d\u63db\u3048(\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u30b7\u30e3\u30fc\u30d7\u3092\u5916\u3059)\u3002\u307e\u305f\u3001\u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u306f\u9069\u5b9c\u5909\u66f4\u3059\u308b\u3002\u5c1a\u3001\u4e00\u756a\u4e0b\u306esmtp_tls\u306a\u3093\u3061\u3083\u3089\u306f\u8ffd\u8a18\u3057\u306a\u304f\u3066\u3082\u9001\u4fe1\u3067\u304d\u308b\u304c\u3001\u9001\u4fe1\u6642\u306b\u6697\u53f7\u5316\u3055\u308c\u306a\u3044\u305f\u3081\u30d6\u30e9\u30a6\u30b6\u7248Gmail\u3068\u304b\u304b\u3089\u898b\u305f\u969b\u306b\u8b66\u544a\u30de\u30fc\u30af\u307f\u305f\u3044\u306a\u306e\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">myhostname = test.com\r\nmydomain = test.com\r\nmasquerade_domains = test.com\r\nsmtp_tls_CAfile = \/etc\/pki\/tls\/cert.pem<\/pre>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4e0a\u66f8\u304d\u4fdd\u5b58\u3057\u3001\u4ee5\u4e0b\u64cd\u4f5c\u3092\u884c\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u6cd5\u30c1\u30a7\u30c3\u30af(\u30a8\u30e9\u30fc\u304c\u7121\u3044\u5834\u5408\u306f\u4f55\u3082\u8868\u793a\u3055\u308c\u306a\u3044)\r\npostfix check\r\n\r\n#postfix\u518d\u8d77\u52d5\r\nsystemctl restart postfix<\/pre>\n<p>&nbsp;<\/p>\n<h2>SPF\u30ec\u30b3\u30fc\u30c9\u8a2d\u5b9a<\/h2>\n<p>TXT\u30ec\u30b3\u30fc\u30c9\u3067\u4ee5\u4e0b\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">v=spf1 +a +mx include:test.com ~all<\/pre>\n<p>SPF\u30ec\u30b3\u30fc\u30c9\u304c\u6b63\u5e38\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306f<a href=\"https:\/\/www.kitterman.com\/spf\/validate.html?\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8<\/a>\u3067\u78ba\u8a8d\u3067\u304d\u308b\u3002\u8a2d\u5b9a\u304b\u3089\u6570\u6642\u9593\u5f8c\u3050\u3089\u3044\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u826f\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30e1\u30fc\u30eb\u9001\u4fe1\u30c6\u30b9\u30c8<\/h2>\n<p>\u4ee5\u4e0b\u30d7\u30ed\u30b0\u30e9\u30e0\u7b49\u3067\u9001\u4fe1\u30c6\u30b9\u30c8\u3092\u884c\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php\r\nini_set( 'display_errors', 1 );\r\nmb_language('ja');\r\nmb_internal_encoding('UTF-8');\r\n$from = 'from@test.com';\r\n$to = 'to@test.com';\r\nif( mb_send_mail($to, 'subject', 'body', \"From: {$from}\\r\\n\", \"-f{$from}\") ){\r\n\/\/\u6210\u529f\u6642\u51e6\u7406\r\necho 1;\r\n}else{\r\n\/\/\u5931\u6557\u6642\u51e6\u7406\r\necho 0;\r\n}\r\n<\/pre>\n<p>\u5c1a\u3001\u9001\u4fe1\u306e\u969b\u306fSSH\u63a5\u7d9a\u3057\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066\u304a\u3044\u3066\u30ed\u30b0\u304c\u898b\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u304b\u3082\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">tail -f \/var\/log\/maillog<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u6ce8\u610f\u70b9<\/h2>\n<p>history\u30b3\u30de\u30f3\u30c9\u3067\u904e\u53bb\u306e\u5165\u529b\u5c65\u6b74\u3092\u898b\u305f\u3068\u3053\u308dPostfix\u5c0e\u5165\u6642\u306b\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u305f\u305f\u3081\u3001telnet\u95a2\u9023\u306e\u8a2d\u5b9a\u7b49\u3082\u5fc5\u8981\u306a\u306e\u304b\u3082\u3002\u3053\u306e\u8fba\u306f\u3046\u308d\u899a\u3048\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">yum -y install telnet\r\ntelnet localhost 25<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u30d6\u30ed\u30b0\u306e\u30b5\u30fc\u30d0\u3092KAGOYA\u306eVPS\u304b\u3089WebARENA Indigo\u3078\u79fb\u884c\u3057 ... <\/p>\n","protected":false},"author":1,"featured_media":3999,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[46,7],"tags":[],"class_list":["post-3678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps","category-server"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=3678"}],"version-history":[{"count":2,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3678\/revisions"}],"predecessor-version":[{"id":4300,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3678\/revisions\/4300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/3999"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=3678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=3678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=3678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}