{"id":1229,"date":"2016-05-17T14:09:09","date_gmt":"2016-05-17T05:09:09","guid":{"rendered":"http:\/\/www.kinryo.net\/?p=1229"},"modified":"2016-05-17T14:09:09","modified_gmt":"2016-05-17T05:09:09","slug":"%ef%bc%93%ef%bc%90%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%9apostfixadmin","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=1229","title":{"rendered":"\uff13\uff10\uff1a\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\uff1apostfixadmin"},"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<a href=\"http:\/\/sourceforge.net\/projects\/postfixadmin\/files\/latest\/download\" target=\"_blank\">http:\/\/sourceforge.net\/projects\/postfixadmin\/files\/latest\/download\u304b\u3089<\/a>\u6700\u65b0\u7248\u306epostfixadmin\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff082014-06-04\u73fe\u5728\u306fpostfixadmin-2.91.tar.gz\uff09<br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u79fb\u308a<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">tar zxvf postfixadmin-2.91.tar.gz<\/span><br \/>\n\u51fa\u6765\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3092\u81ea\u5206\u306eWEB\u306e\u30eb\u30fc\u30c8\u306b\u30b3\u30d4\u30fc\u3057\u3001\u540d\u524d\u3092postfixadmin\u306b\u5909\u66f4\u3057\u3066\u304a\u304f\u3002<br \/>\nmysql\u306b\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u4f5c\u308a\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u3092\u8a2d\u5b9a<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">mysql -u root -p<\/span><br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u5f8c<br \/>\n<span style=\"color: #ff6600;\">mysql&gt;<\/span> <span style=\"color: #0000ff;\">CREATE DATABASE postfix;<\/span><br \/>\n<span style=\"color: #0000ff;\"><span style=\"color: #ff6600;\">mysql&gt;<\/span> CREATE USER &#8216;postfix&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;\u30d1\u30b9\u30ef\u30fc\u30c9&#8217;;<\/span><br \/>\n<span style=\"color: #0000ff;\"><span style=\"color: #ff6600;\">mysql&gt;<\/span> GRANT ALL PRIVILEGES ON `postfix` . * TO &#8216;postfix&#8217;@&#8217;localhost&#8217;;<\/span><br \/>\n<span style=\"color: #0000ff;\"><span style=\"color: #ff6600;\">mysql&gt;<\/span> quit<\/span><br \/>\n\u6ce8\uff1a\u3042\u308b\u6642\u30c6\u30b9\u30c8\u4e2d\u306b CREATE USER \u3092\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u51fa\u305f<\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #ff6600;\">ERROR 1396 (HY000): Operation CREATE USER failed for 'postfix'@'localhost'<\/span><\/code><\/pre>\n<\/div>\n<p>\u3053\u308c\u306fpostfix user\u3092\u3057\u305f\u5f8c\u306b\u884c\u3063\u305f\u3089\u51fa\u305f\u30a8\u30e9\u30fc\u3002<a href=\"http:\/\/d.hatena.ne.jp\/kobapan\/20090910\/1252552185\" target=\"_blank\">\u3053\u3053\u306b\u7406\u7531\u304c\u3042\u3063\u305f<\/a>\u3002\u3053\u3053\u306b\u3088\u308b\u3068delete\u3057\u305f\u3060\u3051\u3067\u306f\u5b8c\u5168\u306b\u6d88\u53bb\u3055\u308c\u305a\u3001DROP USER \u3092\u3059\u308b\u3068\u3088\u3044\u3002<br \/>\n\u6b21\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fpostfixadmin\u306e\u4e0b\u306b\u3042\u308bconfig.inc.php\u306e\u8a2d\u5b9a\uff08\u5909\u66f4\u7b87\u6240\u306e\u307f\u629c\u7c8b\uff09<\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">$CONF['configured'] = true;\u3000<span style=\"color: #000000;\">\u2190 true\u306b\u5909\u66f4<\/span>\r\n$CONF['default_language'] = 'ja';\u3000<span style=\"color: #000000;\">\u2190 ja\u306b\u5909\u66f4<\/span>\r\n$CONF['database_password'] = '\u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9';\r\n$CONF['encrypt'] = 'cleartext';\u3000<span style=\"color: #000000;\">\u2190 cleartext\u306b\u5909\u66f4<\/span>\r\n$CONF['show_password'] = 'YES';\u3000<span style=\"color: #000000;\">\u2190 YES\u306b\u5909\u66f4<\/span>\r\n$CONF['page_size'] = '50';\u3000<span style=\"color: #000000;\">\u2190 50\u306b\u5909\u66f4<\/span>\r\n$CONF['default_aliases'] = array (\r\n    'abuse' =&gt; 'abuse@kinryokai.net',\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n    'hostmaster' =&gt; 'hostmaster@kinryokai.net',\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n    'postmaster' =&gt; 'postmaster@kinryokai.net',\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n    'webmaster' =&gt; 'webmaster@kinryokai.net'\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n$CONF['aliases'] = '0';\u3000<span style=\"color: #000000;\">\u2190 0\u306b\u5909\u66f4<\/span>\r\n$CONF['mailboxes'] = '0';\u3000<span style=\"color: #000000;\">\u2190 0\u306b\u5909\u66f4<\/span>\r\n$CONF['maxquota'] = '0';\u3000<span style=\"color: #000000;\">\u2190 0\u306b\u5909\u66f4<\/span>\r\n$CONF['domain_quota_default'] = '0';\u3000<span style=\"color: #000000;\">\u2190 0\u306b\u5909\u66f4<\/span>\r\n$CONF['vacation_domain'] = 'autoreply.kinryokai.net';\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n$CONF['header_text'] = ':: kinryokai.net ::';\u3000<span style=\"color: #000000;\">\u2190 \u53f3\u8fba\u3092\u5909\u66f4<\/span>\r\n$CONF['footer_text'] = 'Return to kinryokai.net';\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n$CONF['footer_link'] = 'http:\/\/kinryokai.net';\u3000<span style=\"color: #000000;\">\u2190 \u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u5909\u66f4<\/span>\r\n$CONF['emailcheck_resolve_domain']='NO';\u3000<span style=\"color: #000000;\">\u2190 NO\u306b\u5909\u66f4<\/span>\r\n$CONF['create_mailbox_subdirs_prefix']='';<\/span>\u3000<span style=\"color: #000000;\">\u2190 \"\"\u306b\u5909\u66f4<\/span><\/code><\/pre>\n<\/div>\n<p><img decoding=\"async\" src=\"http:\/\/www.kinryokai.net\/uploads\/img53916ba22f97d.png\" alt=\"\" align=\"left\" \/><img decoding=\"async\" src=\"http:\/\/www.kinryokai.net\/uploads\/img5391769f26950.png\" alt=\"\" \/>\u4fdd\u5b58\u5f8c\u30d6\u30e9\u30a6\u30b6\u304b\u3089 localhost\/postfixadmin\/setup.php \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068<br \/>\n<span style=\"color: #ff6600;\">Error: Smarty template compile directory templates_c is not writable.<\/span><br \/>\n<span style=\"color: #ff6600;\">Please make it writable.<\/span><br \/>\n<span style=\"color: #ff6600;\">If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Warning: Depends on: IMAP functions &#8211; NOT FOUND<\/span><br \/>\n<span style=\"color: #ff6600;\">To install IMAP support, install php5-imap<\/span><br \/>\n<span style=\"color: #ff6600;\">Without IMAP support, you won&#8217;t be able to create subfolders when creating mailboxes.<\/span><br \/>\n\u3068 \u4e8c\u3064\u306e\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u305f\u3002\u4e00\u3064\u76ee\u306ftenplates_c\u304c\u66f8\u3051\u308b\u69d8\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u3068\u3002\u53c8SELINUX\u7b49\u3092\u4f7f\u3063\u3066\u3044\u305f\u3089\u8abf\u6574\u304c\u5fc5\u8981\u3060\u3068\u3002 SELINUX\u306f\u4f7f\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u66f8\u304d\u8fbc\u3081\u308b\u3088\u3046\u306b\u3059\u308b\u304c\u3001\u3053\u306e\u969b\u30b0\u30eb\u30fc\u30d7\u3082\u5909\u66f4\u3057\u3066\u304a\u3053\u3046\u3002pwd\u3092WEB\u306e\u30eb\u30fc\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u5909\u66f4\u3057\u305f\u3089<br \/>\n<span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> chown -R .apache postfixadmin<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> chmod 770 postfixadmin<\/span><br \/>\n\u4e8c\u3064\u76ee\u306fphp5-imap\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u308d\u3068\u3042\u308b\u304c\u3001CentOS\u306f<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">yum install php-imap<\/span><br \/>\n\u5909\u66f4\u3057\u305f\u3089\u518d\u5ea6\u30a2\u30af\u30bb\u30b9\u3001\u3059\u308b\u3068\u753b\u97621\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u4e0b\u306e\u65b9\u306b\u3042\u308b Change setup password \u306e\u4e0b\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306eBOX\u306f config.inc.php \u306b\u8a2d\u5b9a\u3059\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u3060\u304c\u5165\u529b\u5f8c\u306f\u6697\u53f7\u5316\u3055\u308c\u305f\u5206\u304c\u8868\u793a\u3055\u308c\u308b\u3002<br \/>\n\u8a2d\u5b9a\u3057\u305f\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u30922\u30f6\u6240\u306b\u5165\u308c\u3001generate pasword hash \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068<br \/>\n<span style=\"color: #ff6600;\">$CONF[&#8216;setup_password&#8217;] = &#8216;\u30db\u30cb\u30e3\u30e9\u30e9&#8217;;<\/span><br \/>\n\u3068\u8868\u793a\u304c\u3042\u308b\u7b48\u3002<br \/>\nconfig.inc.php \u306b\u3042\u308b $CONF[&#8216;setup_password&#8217;] = &#8216;changeme&#8217;; \u306echangeme\u306e\u4ee3\u308f\u308a\u306b\u30db\u30cb\u30e3\u30e9\u30e9\u3092\u8a2d\u5b9a\u3057\u518d\u5ea6\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u753b\u9762\uff12\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff08\u753b\u9762\u4e0a\u90e8\u306f\u30ab\u30c3\u3068\u3057\u3066\u3042\u308a\u307e\u3059\uff09<br \/>\nSetup password \u306b\u306f\u4eca\u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3001\u7ba1\u7406\u8005\u306b\u306f\u30e1\u30a2\u30c9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u304c\u3001\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306f\u307e\u3060\u51fa\u6765\u3066\u3044\u307e\u305b\u3093\u306e\u3067ISP\u306e\u30e1\u30a2\u30c9\u3067\u3082\u5165\u308c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\uff12\u56de\u5165\u529b\u5f8c\u3001 \u7ba1\u7406\u8005\u8ffd\u52a0\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u518d\u5ea6\u540c\u3058\u3088\u3046\u306a\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u3055\u3089\u306b\u7ba1\u7406\u8005\u3092\u8ffd\u52a0\u51fa\u6765\u308b\u70ba\u3067\u3059\u3002\u53c8\u3001\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f setup.php\u306f\u6d88\u53bb\u3057\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u5fc5\u8981\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\u4eca\u5f8c\u306e\u7ba1\u7406\u8005\u306e\u8ffd\u52a0\u3092\u3059\u308b\u6642\u306e\u70ba\u306b\u305d\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.kinryokai.net\/uploads\/img53917dfc1a62d.png\" alt=\"\" align=\"left\" \/>\u30d6\u30e9\u30a6\u30b6\u304b\u3089 locahost\/postfixadmin \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u753b\u9762\uff13\u304c\u8868\u793a\u3055\u308c\u3001\u4eca\u8a2d\u5b9a\u3057\u305f\u7ba1\u7406\u8005\uff08\u30e1\u30a2\u30c9\uff09\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3001\u30ed\u30b0\u30a4\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068<img decoding=\"async\" src=\"http:\/\/www.kinryokai.net\/uploads\/img5391839dc80f2.png\" alt=\"\" align=\"left\" \/>\u753b\u9762\uff14\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3053\u308c\u4ee5\u4e0a\u306e\u8aac\u660e\u306f\u884c\u3044\u307e\u305b\u3093\u304c\u3001\u30c9\u30e1\u30a4\u30f3\u3084\u30e1\u30a2\u30c9\u3092\u4f5c\u3063\u3066\u3044\u304f\u306e\u306f\u305d\u3093\u306a\u306b\u96e3\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u305e\u308c\u306e\u6240\u3092\u30af\u30ea\u30c3\u30af\u3059\u308c\u3070\u898b\u5f53\u304c\u3064\u304f\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u53c8\u3001\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306f\u81ea\u5206\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u306e\u3067\u3001WEB\u306eURL\/postfixadmin\/users\/login.php \u3092\u77e5\u3089\u305b\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\npostfixadmin\u304b\u3089\u30c9\u30e1\u30a4\u30f3\u3084\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u3066\u3082\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u304b\u3089\u306f\u524a\u9664\u3055\u308c\u307e\u3059\u304c\u5b9f\u614b\u3067\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306a\u3069\u306f\u524a\u9664\u3055\u308c\u307e\u305b\u3093\u3002\u79c1\u306f\u30c9\u30e1\u30a4\u30f3\u3084\u30e6\u30fc\u30b6\u30fc\u306e\u524a\u9664\u306f\u307b\u3068\u3093\u3069\u7121\u3044\u306e\u3067\u4e07\u304c\u4e00\u3042\u3063\u305f\u5834\u5408\u306f\u30de\u30cb\u30e5\u30a2\u30eb\u3067\u524a\u9664\u3059\u308b\u4e8b\u306b\u3057\u307e\u3057\u305f\u304c\u3001\u81ea\u52d5\u3067\u884c\u3044\u305f\u3044\u6642\u306f<a href=\"http:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual\" target=\"_blank\">http:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual\u306e\u201d\u524a\u9664\u51e6\u7406\u201d\u306b\u65b9\u6cd5\u304c\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059<\/a>\u3002 \u53c8\u3001\u30a2\u30af\u30bb\u30b9\u3057\u305f\u6642\u306b\u304a\u77e5\u3089\u305b\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3059\u304c\u3001\u6614\u306f\u5225\u306e\u30d5\u30a1\u30a4\u30eb\uff08motd.txt, motd-user.txt)\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u306a\u304f\u306a\u3063\u3066\u304a\u308a\u3001config.inc.php \u306b$CONF[&#8216;motd_user&#8217;] = &#8221;;\u7b49\u3068\u8a2d\u5b9a\u304c\u308a\u3001\u3053\u3053\u306b\u8a18\u5165\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u898b\u305f\u3044\u3067\u3059\u3002<br \/>\n\u6b21\u306fpostfix\u306e\u8a2d\u5b9a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003URL\uff1ahttp:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/postfix-virtual http:\/\/sourceforge.net\/projects\/postfixadm &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=1229\">\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-1229","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\/1229","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=1229"}],"version-history":[{"count":4,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1229\/revisions"}],"predecessor-version":[{"id":1233,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1229\/revisions\/1233"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}