{"id":1878,"date":"2015-06-15T01:40:15","date_gmt":"2015-06-14T16:40:15","guid":{"rendered":"http:\/\/tech.akat.info\/?p=1878"},"modified":"2015-06-17T01:33:13","modified_gmt":"2015-06-16T16:33:13","slug":"postfix%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%a8%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=1878","title":{"rendered":"postfix\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a"},"content":{"rendered":"<p>akat.info\u306e\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u3001debian8 \u306bpostfix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f<br \/>\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u3082\u3072\u3068\u3064\u3072\u3068\u3064\u78ba\u8a8d\u3059\u308b<\/p>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu\/# aptitude install postfix\r\n\u4ee5\u4e0b\u306e\u65b0\u898f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:\r\n  postfix\r\n...\r\n<\/pre>\n<p><a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004410.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004410-300x165.png\" alt=\"2015-06-15_004410\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-1879\" srcset=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004410-300x165.png 300w, https:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004410.png 490w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004401.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004401-300x208.png\" alt=\"2015-06-15_004401\" width=\"300\" height=\"208\" class=\"alignnone size-medium wp-image-1880\" srcset=\"https:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004401-300x208.png 300w, https:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004401-200x140.png 200w, https:\/\/tech.akat.info\/wp-content\/uploads\/2015\/06\/2015-06-15_004401.png 536w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>\u77e5\u3063\u3066\u3044\u308b\u3068\u4fbf\u5229\u306a\u30b3\u30de\u30f3\u30c9<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n### \u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d ###\r\nroot@hostname:\/home\/shimizu# postconf | grep &amp;quot;mail_version &amp;quot;\r\nmail_version = 2.11.3\r\n\r\n### status\u8868\u793a ###\r\nroot@hostname:\/home\/shimizu# postfix status\r\npostfix\/postfix-script: the Postfix mail system is running: PID: 10217\r\n\r\n### \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f(\u305f\u3060\u3057inet_interfaces\u306b\u3064\u3044\u3066\u306f\u518d\u8d77\u52d5\u304c\u5fc5\u8981) ###\r\nroot@hostname:\/home\/shimizu# postfix reload\r\npostfix\/postfix-script: refreshing the Postfix mail system\r\n\r\n\r\n### \u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b ###\r\nroot@hostname:\/home\/shimizu# postfix check\r\n\/usr\/sbin\/postconf: warning: \/etc\/postfix\/main.cf: unused parameter: shimizu=no\r\n\r\n### \u5229\u7528\u3067\u304d\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5f62\u5f0f\u8868\u793a ###\r\nroot@hostname:\/home\/shimizu# postconf -m\r\nbtree\r\ncidr\r\nenviron\r\nfail\r\nhash\r\n...\r\n\r\n### \u30c7\u30d5\u30a9\u30eb\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u8868\u793a ###\r\nroot@hostname:\/home\/shimizu# postconf -d \r\n2bounce_notice_recipient = postmaster\r\naccess_map_defer_code = 450\r\naccess_map_reject_code = 554\r\n...\r\n\r\n### \u30c7\u30d5\u30a9\u30eb\u30c8\u304b\u3089\u8a2d\u5b9a\u5909\u66f4\u3057\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u8868\u793a ###\r\nroot@hostname:\/home\/shimizu# postconf -n\r\nalias_database = hash:\/etc\/aliases\r\nalias_maps = hash:\/etc\/aliases\r\nappend_dot_mydomain = no\r\n...\r\n<\/pre>\n<h1>main.cf\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u3064\u3044\u3066<\/h1>\n<h2>mynetworks<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# \u30e1\u30fc\u30eb\u3092\u30ea\u30ec\u30fc\u3059\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\r\nmynetworks = 127.0.0.0\/8\r\n<\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089telnet\u3092\u5229\u7528\u3057\u3066\u3001\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408<br \/>\n&#8220;Relay access denied&#8221; \u30a8\u30e9\u30fc\u3068\u306a\u308a\u3001\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306b\u3082\u4ee5\u4e0b\u306e\u30ed\u30b0\u304c\u6b8b\u308b<br \/>\nJun 15 02:33:08 hostname postfix\/smtpd[11873]: NOQUEUE: reject: RCPT from unknown[104.42.99.92]: 454 4.7.1 <shimizu.test0@gmail.com>: Relay access denied; from=<test@akat.info> to=<shimizu.test0@gmail.com> proto=SMTP helo=<akat.info><br \/>\n\u305f\u3060\u3057\u3001relay_domains(default\u3067mydestination\u304c\u8a2d\u5b9a)\u3092\u5b9b\u5148\u306b\u3057\u3066\u30e1\u30fc\u30eb\u3059\u308b\u3068\u3001\u30ea\u30ec\u30fc\u3067\u306f\u306a\u3044\u305f\u3081\u30a8\u30e9\u30fc\u3068\u306a\u3089\u306a\u3044<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@vmdepot-debia:\/home\/shimizu# telnet mail.akat.info 25\r\nTrying 49.212.204.46...\r\nConnected to mail.akat.info.\r\nEscape character is '^]'.\r\n220 mail.akat.info ESMTP Postfix (Debian\/GNU)\r\nquit\r\n221 2.0.0 Bye\r\nConnection closed by foreign host.\r\nroot@vmdepot-debia:\/home\/shimizu# telnet mail.akat.info 25\r\nTrying 49.212.204.46...\r\nConnected to mail.akat.info.\r\nEscape character is '^]'.\r\n220 mail.akat.info ESMTP Postfix (Debian\/GNU)\r\nHELO akat.info\r\n250 mail.akat.info\r\nmail from: test@akat.info\r\n250 2.1.0 Ok\r\nrcpt to: shimizu.test0@gmail.com\r\n454 4.7.1 &amp;lt;shimizu.test0@gmail.com&amp;gt;: Relay access denied\r\nrcpt to: root@akat.info\r\n250 2.1.5 Ok\r\n...\r\n<\/pre>\n<h2>alias_maps<\/h2>\n<p>\u30a8\u30a4\u30ea\u30a2\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b<\/p>\n<pre class=\"brush: plain; title: admin@ \u306froot\u306b\u8ee2\u9001\u3059\u308b; notranslate\" title=\"admin@ \u306froot\u306b\u8ee2\u9001\u3059\u308b\">\r\nroot@hostname:\/home\/shimizu# postconf | grep alias_maps\r\nalias_maps = hash:\/etc\/aliases\r\n...\r\nroot@hostname:\/home\/shimizu# vi \/etc\/aliases\r\npostmaster:    root\r\nadmin:    root\r\nroot@hostname:\/home\/shimizu# postalias \/etc\/aliases\r\n<\/pre>\n<h2>header_checks<\/h2>\n<p>\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u306b\u3066\u5236\u9650\u3059\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# cat \/etc\/postfix\/main.cf | grep header_checks\r\nheader_checks = regexp:\/etc\/postfix\/header_checks\r\n\r\nroot@hostname:\/home\/shimizu# cat \/etc\/postfix\/header_checks\r\n\/^Subject:.*delete.*\/ REJECT\r\n\/^Subject:.*forward.*\/ REDIRECT root@akat.info\r\n\r\n### \u78ba\u8a8d\u3059\u308b ###\r\nroot@hostname:\/home\/shimizu# postmap -q Subject:forward regexp:\/etc\/postfix\/header_checks\r\nREDIRECT root@akat.info\r\n<\/pre>\n<p>\u5b9f\u969b\u306b\u8a66\u3057\u3066\u307f\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# telnet mail.akat.info 25\r\nTrying 49.212.204.46...\r\nConnected to mail.akat.info.\r\nEscape character is '^]'.\r\n220 mail.akat.info Mail System\r\nhelo mail.akat.info\r\n250 mail.akat.info\r\nmail from: shimizu@akat.info\r\n250 2.1.0 Ok\r\nrcpt to: root@akat.info\r\n250 2.1.5 Ok\r\ndata\r\n354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;\r\nsubject: i want to delete\r\ntest\r\n.\r\n550 5.7.1 message content rejected\r\n<\/pre>\n<h1>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3<\/h1>\n<h2>\u4e0d\u6b63\u4e2d\u7d99\u3055\u308c\u306a\u3044\u304b\u78ba\u8a8d\u3059\u308b<\/h2>\n<p>\u30b0\u30b0\u308b\u3068\u3044\u308d\u3044\u308d\u306a\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b<br \/>\nhttp:\/\/www.rbl.jp\/svcheck.php<\/p>\n","protected":false},"excerpt":{"rendered":"<p>akat.info\u306e\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u3001debian8 \u306bpostfix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u3082\u3072\u3068\u3064\u3072\u3068\u3064\u78ba\u8a8d\u3059\u308b \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb root@hostname:\/home\/shimizu\/#  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1878"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1878"}],"version-history":[{"count":7,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1878\/revisions"}],"predecessor-version":[{"id":1889,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1878\/revisions\/1889"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}