{"id":65,"date":"2014-12-17T21:47:59","date_gmt":"2014-12-17T12:47:59","guid":{"rendered":"http:\/\/vicsfactory.com\/?p=65"},"modified":"2023-11-15T10:08:31","modified_gmt":"2023-11-15T01:08:31","slug":"centos7-%e3%80%8c%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%ef%bc%88postfixdovrcot%ef%bc%89%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%83%bb%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/vicsfactory.com\/?p=65","title":{"rendered":"CentOS7 \u300c\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\uff08Postfix+Dovecot\uff09\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u300d"},"content":{"rendered":"<p>Postfix+Dovecot\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a<\/p>\n<p>\u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"http:\/\/centossrv.com\" target=\"_blank\" rel=\"noopener\">CentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8<\/a>\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u25cfPostfix\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install postfix<\/p>\n<p>\u25cfPostfix\u8a2d\u5b9a<br \/>\n# vi \/etc\/postfix\/main.cf<br \/>\nmyhostname = mail.vicsfactory.com<br \/>\nmydomain = vicsfactory.com<br \/>\nmyorigin = $mydomain<br \/>\ninet_interfaces = all<br \/>\nmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain<br \/>\nhome_mailbox = Maildir\/<\/p>\n<p>\u4ee5\u4e0b\u3092\u6700\u7d42\u884c\u3078\u8ffd\u52a0(SMTP-Auth\u8a2d\u5b9a)<br \/>\nsmtpd_sasl_auth_enable = yes<br \/>\n<code class=\"plain\">broken_sasl_auth_clients = yes<\/code><\/p>\n<p>1\u901a\u306e\u30e1\u30fc\u30eb\u306e\u6700\u5927\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\uff08\u7121\u5236\u9650\u306e\u5834\u5408\u306f0\uff09<br \/>\nmessage_size_limit = 0<\/p>\n<p>\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306e\u6700\u5927\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\uff08\u7121\u5236\u9650\u306e\u5834\u5408\u306f0\uff09<br \/>\nmailbox_size_limit = 0<\/p>\n<p>\u25cfsubmission\u30dd\u30fc\u30c8\u306e\u8a2d\u5b9a<br \/>\n<code class=\"plain\">vi \/etc\/postfix\/master.cf<\/code><br \/>\n\u4e0b\u8a183\u884c\u306e\u884c\u982d\u306e\uff03\u3092\u524a\u9664<br \/>\n<code class=\"plain\">submission inet n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 smtpd<\/code><br \/>\n<code class=\"plain\">-o smtpd_sasl_auth_enable=yes<\/code><br \/>\n<code class=\"plain\">-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject<\/code><\/p>\n<p>\u25cfSASL\u306e\u8a2d\u5b9a<br \/>\n# yum -y install cyrus-sasl<br \/>\n# systemctl start saslauthd<br \/>\n# systemctl enable saslauthd<\/p>\n<p>\u30fbSMTP\u8a8d\u8a3c\u306e\u8a2d\u5b9a<br \/>\n# <code class=\"plain\">vi \/etc\/sasl2\/smtpd.conf<\/code><br \/>\n\u4e0b\u8a182\u884c\u3092\u66f8\u304d\u63db\u3048<br \/>\n<code class=\"plain\">pwcheck_method: auxprop<\/code><br \/>\n<code class=\"plain\">mech_list: cram-md5 plain login<\/code><\/p>\n<p>\u25cf\u65b0\u898f\u30e6\u30fc\u30b6\u8ffd\u52a0\u6642\u306b\u81ea\u52d5\u3067\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bMaildir\u5f62\u5f0f\u306e\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u304c\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b<br \/>\n# mkdir -p \/etc\/skel\/Maildir\/{new,cur,tmp}<br \/>\n# systemctl restart postfix<\/p>\n<p>\u25cfPostfix\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<br \/>\n# systemctl enable postfix<\/p>\n<p>\u25cfDovecot\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install dovecot<\/p>\n<p>Dovecot\u8a2d\u5b9a<br \/>\n<code class=\"plain\">vi \/etc\/dovecot\/dovecot.conf<\/code><br \/>\n<code class=\"plain\">#protocols = imap pop3 lmtp<br \/>\n\u2193<br \/>\nprotocols = imap pop3<br \/>\n#listen = *, ::<br \/>\n\u2193<br \/>\nlisten = *<\/code><\/p>\n<p># vi \/etc\/dovecot\/conf.d\/10-mail.conf<br \/>\nmail_location = maildir:~\/Maildir<\/p>\n<p><code class=\"plain\"># vi \/etc\/dovecot\/conf.d\/10-auth.conf<br \/>\n#disable_plaintext_auth = yes<br \/>\n\u2193<br \/>\ndisable_plaintext_auth = no<\/code><\/p>\n<p># <code class=\"plain\">vi \/etc\/dovecont\/conf.d\/10-ssl.conf<\/code><br \/>\n<code class=\"plain\">ssl = no<\/code><\/p>\n<p>\u25cfDovecot\u8d77\u52d5<br \/>\n# systemctl start dovecot<\/p>\n<p>\u25cfDovecot\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<br \/>\n# systemctl enable dovecot<\/p>\n<p>\u203b\u30eb\u30fc\u30bf\u30fc\u3067TCP25\u756a\u3068TCP587\u756a\u3001TCP110\u756a\u3068TCP143\u756a\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u3059\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b<\/p>\n<p>\u25cf\u30e1\u30fc\u30eb\u5c02\u7528\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210<br \/>\n# useradd -s \/sbin\/nologin username<br \/>\n# passwd username<br \/>\nChanging password for user username.<br \/>\nNew UNIX password: \uff08\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\uff09<br \/>\nRetype new UNIX password: \uff08\u30d1\u30b9\u30ef\u30fc\u30c9\u78ba\u8a8d\uff09<\/p>\n<p>\uff08SMTP-Auth\u7528\u30e6\u30fc\u30b6\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u767b\u9332\uff09<br \/>\n# echo &#8216;\u30d1\u30b9\u30ef\u30fc\u30c9&#8217; | saslpasswd2 -p -u mail.example.com -c username<\/p>\n<p>\uff08SMTP-Auth\u7528\u30e6\u30fc\u30b6\u540d\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d\uff09<br \/>\n# sasldblistusers2<br \/>\nusername@mail.example.com: userPassword<\/p>\n<p>\uff08sasldb2\u306e\u6240\u6709\u30b0\u30eb\u30fc\u30d7\u3092postfix\u306b\u3059\u308b\uff08\u521d\u56de\u306e\u307f\uff09\uff09<br \/>\n# chgrp postfix \/etc\/sasldb2<br \/>\n(sasldb2\u306e\u5834\u6240\u304c\/etc\/sasl2\/sasldb2\u306e\u5834\u5408\u3082\u3042\u308a\u307e\u3059)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postfix+Dovecot\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a \u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300cCentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 \u25cfPostfix\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # yum  &hellip; <a href=\"https:\/\/vicsfactory.com\/?p=65\">\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":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/65"}],"collection":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":21,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":373,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/373"}],"wp:attachment":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}