{"id":1234,"date":"2016-05-17T14:18:55","date_gmt":"2016-05-17T05:18:55","guid":{"rendered":"http:\/\/www.kinryo.net\/?p=1234"},"modified":"2016-05-17T14:18:55","modified_gmt":"2016-05-17T05:18:55","slug":"%ef%bc%93%ef%bc%91%ef%bc%9a%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e8%a8%ad%e5%ae%9a%ef%bc%9apostfix","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=1234","title":{"rendered":"\uff13\uff11\uff1a\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\uff1apostfix"},"content":{"rendered":"<p class=\"itemText\">\u53c2\u8003URL\uff1a<a href=\"http:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual\" target=\"_blank\">http:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual<\/a><br \/>\n\u4eca\u307e\u3067\u306flocal\u306e\u30e1\u30fc\u30eb\u306faliases\u3067kinryokai.net\u306b\u8ee2\u9001\u51fa\u6765\u3066\u3044\u307e\u3057\u305f\u304c\u3002local\u30e1\u30fc\u30eb\u3082virtual\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u306e\u3067\u3001\u8ee2\u9001\u51fa\u6765\u306a\u304f\u306a\u308a\u307e\u3059\u306e\u3067\u3001local\u306e\u30e1\u30fc\u30eb\u306fISP\u306e\u30e1\u30a2\u30c9\u306b\u8ee2\u9001\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br \/>\n\u79c1\u306f\u30e1\u30fc\u30eb\u30bd\u30d5\u30c8\u306fthunderbird\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3001\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u8a2d\u5b9a\u3067\u3001\u305d\u306e\u30b5\u30fc\u30d0\u30fc\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u554f\u984c\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/aliases<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">\u524d\u7565\r\nroot: ISP\u306e\u30e1\u30a2\u30c9<\/span><\/code><\/pre>\n<\/div>\n<p><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">newaliases<\/span><br \/>\n<span style=\"color: #000000;\">\u6b21\u306bvirtual\u5c02\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u308a\u307e\u3059<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> groupadd -g 10000 vuser<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> useradd -g vuser -u 10000 -s \/sbin\/nologin vuser<\/span><br \/>\n<b>\uff0apostfix\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\uff08\u629c\u7c8b\uff09<\/b><br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/postfix\/main.cf<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">\u5909\u66f4\u7b87\u6240\u306e\u307f\r\nmyhostname = mail.kinryokai.net\u3000<span style=\"color: #000000;\">\u2190 \u81ea\u5206\u306e\u30db\u30b9\u30c8\u540d<\/span>\r\nmydomain = kinryokai.net\u3000<span style=\"color: #000000;\">\u2190 \u81ea\u5206\u306e\u30c9\u30e1\u30a4\u30f3<\/span>\r\nmyorigin = $mydomain\u3000<span style=\"color: #000000;\">\u2190 \u5909\u66f4<\/span>\r\ninet_interfaces = all\u3000<span style=\"color: #000000;\">\u2190 \u5909\u66f4<\/span>\r\ninet_protocols = ipv4\u3000<span style=\"color: #000000;\">\u2190 ipv4\u3057\u304b\u6271\u308f\u306a\u3044<\/span>\r\nmydestination =\u3000<span style=\"color: #000000;\">\u2190 \u53f3\u8fba\u306f\u5fc5\u305a\u30d6\u30e9\u30f3\u30af<\/span>\r\nhome_mailbox = Maildir\/\u3000<span style=\"color: #000000;\">\u2190 #\u3092\u53d6\u308a\u6709\u52b9\u5316<\/span>\r\nheader_checks = regexp:\/etc\/postfix\/header_checks\u3000<span style=\"color: #000000;\">\u2190 #\u3092\u53d6\u308a\u6709\u52b9\u5316<\/span>\r\nsmtpd_banner = $myhostname ESMTP unknown\u3000<span style=\"color: #000000;\">\u2190 #\u3092\u53d6\u308a\u53f3\u8fba\u5909\u66f4<\/span>\r\n\uff03\u3053\u3053\u304b\u3089\u4e0b\u3092\u8ffd\u8a18\r\nmessage_size_limit = 52428800\r\nmailbox_size_limit = 9663676416\r\nvirtual_mailbox_limit = 9663676416\r\n\r\ndisable_vrfy_command = yes\r\nsmtpd_helo_required = yes\r\nsmtpd_sender_restrictions = reject_unknown_sender_domain\r\n\r\n# Virtual Domains with MySQL\r\n#local_transport = local\r\nlocal_transport = virtual\r\n#virtual_transport = virtual <span style=\"color: #000000;\">\uff1a\u30c7\u30d5\u30a9\u30eb\u30c8\u898b\u305f\u3044<\/span>\r\nvirtual_mailbox_base = \/Mail\r\nvirtual_alias_maps = mysql:\/etc\/postfix\/mysql_virtual_alias_maps.cf\r\n#virtual_alias_domains = $virtual_alias_maps\u3000<span style=\"color: #000000;\">\uff1a\u30c7\u30d5\u30a9\u30eb\u30c8\u898b\u305f\u3044<\/span>\r\nvirtual_mailbox_domains = mysql:\/etc\/postfix\/mysql_virtual_domains_maps.cf\r\nvirtual_mailbox_maps = mysql:\/etc\/postfix\/mysql_virtual_mailbox_maps.cf\r\nvirtual_minimum_uid = 10000\r\nvirtual_uid_maps = static:10000\r\nvirtual_gid_maps = static:10000\r\n\r\n# SMTP AUTH\r\nsmtpd_sasl_auth_enable = yes\r\nsmtpd_sasl_security_options = noanonymous\r\nsmtpd_sasl_type = dovecot\r\nsmtpd_sasl_path = private\/auth\r\nsmtpd_sasl_local_domain = $myhostname\r\nsmtpd_client_restrictions =\r\n    permit_mynetworks,\r\n    reject_non_fqdn_sender,\r\n    reject_non_fqdn_recipient,\r\n    reject_unknown_client,\r\n    reject_rbl_client all.rbl.jp,\r\n#    reject_rbl_client zen.spamhaus.org,\r\n#    reject_rbl_client bl.spamcop.net,\r\n    check_client_access hash:\/etc\/postfix\/access,\r\n    permit\r\nsmtpd_recipient_restrictions = \r\n    permit_mynetworks,\r\n    permit_sasl_authenticated,\r\n    permit_auth_destination,\r\n    reject_unauth_destination,\r\n    reject\r\n\r\n# SMTPS\r\n#smtpd_use_tls = yes\r\n#smtpd_tls_cert_file = \/etc\/pki\/tls\/certs\/mail.pem\r\n#smtpd_tls_key_file = \/etc\/pki\/tls\/certs\/mail.pem\r\n#smtpd_tls_session_cache_database = btree:\/var\/lib\/postfix\/smtpd_scache<\/span><\/code><\/pre>\n<\/div>\n<p>SMTPS\u306f\u5168\u90e8\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30c6\u30b9\u30c8\u5f8c\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u8a18\u5165\u3057\u3066\u7f6e\u304d\u307e\u3059\u3002reject_rbl_client\u306f\u3042\u307e\u308a\u591a\u304f\u3059\u308b\u3068\u9045\u304f\u306a\u308b\u306e\u3067\u3001\u69d8\u5b50\u3092\u898b\u306a\u304c\u3089\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<br \/>\nsmtpd_client_restrictions=\u306b check_client_access hash:\/etc\/postfix\/access,\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5168\u3066\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002\u66f8\u5f0f\u306f\u6587\u4e2d\u306b\u8a18\u5165\u304c\u3042\u308a\u307e\u3059\u304c<br \/>\nIP\u30a2\u30c9\u30ec\u30b9 REJECT \u3067\u62d2\u5426\u3059\u308bIP<br \/>\nIP\u30a2\u30c9\u30ec\u30b9 OK \u3067\u30a2\u30af\u30bb\u30d7\u30c8\u3059\u308bIP\u3067\u3059\u3002<br \/>\n\u53c8\u3001IP\u3092\u30001.2.3\u3000\u306e\u3088\u3046\u306b\u8a18\u5165\u3059\u308c\u3070IP\u30ec\u30f3\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u904b\u7528\u5f8c\u306b\u8a2d\u5b9a\u3059\u308c\u3070\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><b>\u3000\uff0amysql\u95a2\u9023\u306e\u4e09\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/b><br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/postfix\/mysql_virtual_alias_maps.cf<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">user = postfix\r\npassword = xxxxxxx\r\nhosts = localhost\r\ndbname = postfix\r\ntable = alias\r\nselect_field = goto\r\nwhere_field =<\/span> <span style=\"color: #0000ff;\">address<\/span><\/code><\/pre>\n<\/div>\n<p><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/postfix\/mysql_virtual_domains_maps.cf<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><span style=\"color: #0000ff;\"><code><span style=\"color: #0000ff;\">user = postfix\r\npassword = xxxxxxx\r\nhosts = localhost\r\ndbname = postfix\r\ntable = domain\r\nselect_field = domain\r\nwhere_field = domain\r\nadditional_conditions = and<\/span> <span style=\"color: #0000ff;\">active = '1'<\/span><\/code><\/span><\/pre>\n<\/div>\n<p><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/postfix\/mysql_virtual_mailbox_maps.cf<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code>u<span style=\"color: #0000ff;\">ser = postfix\r\npassword = xxxxxxx\r\nhosts = localhost\r\ndbname = postfix\r\ntable = mailbox\r\nselect_field = maildir\r\nwhere_field = username<\/span><\/code><\/pre>\n<\/div>\n<p>header_checks\u306e\u7de8\u96c6<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/postfix\/header_checks<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">\/^From:.*&lt;#.*@.*&gt;\/ REJECT\r\n\/^Return-Path:.*&lt;#.*@.*&gt;\/ REJECT<\/span><\/code><\/pre>\n<\/div>\n<p>\u3092\u6700\u5f8c\u306b\u3067\u3082\u8ffd\u8a18<br \/>\nmain.cf\u306b check_client_access hash:\/etc\/postfix\/access, \u3068\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306eDB\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #0000ff;\">postmap \/etc\/postfix\/access<\/span><br \/>\n\u3053\u306e\u30a2\u30af\u30bb\u30b9\u30ea\u30b9\u30c8\u306e\u8a18\u5165\u65b9\u6cd5\u306f<a href=\"http:\/\/www.postfix-jp.info\/trans-2.2\/jhtml\/access.5.html\" target=\"_blank\">http:\/\/www.postfix-jp.info\/trans-2.2\/jhtml\/access.5.html\u306b\u8aac\u660e\u304c\u3042\u308a\u307e\u3059\u3002<\/a>\u81ea\u5206\u3067\u3053\u306e\u30ea\u30b9\u30c8\u3092\u5909\u66f4\u3057\u305f\u3089\u3001\u5fc5\u305a\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067DB\u3092\u66f4\u65b0\u3057\u3066\u7f6e\u304d\u307e\u3059\u3002<br \/>\n\u6b21\u306fdovecot\u306e\u8a2d\u5b9a\u3067\u3059<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003URL\uff1ahttp:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual \u4eca\u307e\u3067\u306flocal\u306e\u30e1\u30fc\u30eb\u306faliases\u3067kinryokai.net\u306b\u8ee2\u9001\u51fa\u6765\u3066\u3044 &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=1234\">\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":{"_acf_changed":false,"vkexunit_cta_each_option":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-1234","post","type-post","status-publish","format-standard","hentry","category-server"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1234"}],"version-history":[{"count":1,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1234\/revisions"}],"predecessor-version":[{"id":1235,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1234\/revisions\/1235"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}