{"id":11218,"date":"2022-05-01T03:51:06","date_gmt":"2022-04-30T18:51:06","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=11218"},"modified":"2022-05-02T16:38:29","modified_gmt":"2022-05-02T07:38:29","slug":"ubuntu-20-04-lts-%e3%82%b5%e3%83%bc%e3%83%90%e6%a7%8b%e7%af%89-dovecot%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=11218","title":{"rendered":"Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 &#8211; Dovecot\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u524d\u56de\u306e<a href=\"https:\/\/www.webcyou.com\/?p=11211\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u306e\u7d9a\u304d\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001Dovecot\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4>\u30e1\u30cb\u30e5\u30fc<\/h4>\n<ul>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11191\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 \u521d\u671f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11197\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Nginx\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11205\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Let\u2019s Encrypt\u3067SSL\/TLS\u5316<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11211\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11218\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Dovecot\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11221\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix SASL\u8a8d\u8a3c<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11230\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix Let\u2019s Encrypt\u3067TLS\u5316<\/a><\/li>\n<li><a href=\"https:\/\/www.webcyou.com\/?p=11234\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 DKIM\u3001DMARC\u3092\u8a2d\u5b9a\u3059\u308b<\/a><\/li>\n<\/ul>\n<h4>\u9001\u53d7\u4fe1\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081Dovecot\u306e\u8a2d\u5b9a<\/h4>\n<h5>DNS\u8a2d\u5b9a\u306e\u78ba\u8a8d<\/h5>\n<p>DNS\u30ec\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3067\u8a2d\u5b9a\u3057\u305fMX\u30ec\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081host\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ host -t mx (\u30c9\u30e1\u30a4\u30f3\u540d)\r\n\r\n(\u30c9\u30e1\u30a4\u30f3\u540d) mail is handled by 10 mail.(\u30c9\u30e1\u30a4\u30f3\u540d)<\/pre>\n<p>\u8a2d\u5b9a\u3057\u305fMX\u30ec\u30b3\u30fc\u30c9\u304c\u8868\u793a\u3055\u306a\u3051\u308c\u3070DNS\u30ec\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3002<\/p>\n<p>host\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u306a\u3051\u308c\u3070\u3001nslookup\u30b3\u30de\u30f3\u30c9\u3084dig\u30b3\u30de\u30f3\u30c9\u3082\u884c\u3048\u308bbind9utils\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo apt install bind9-utils<\/pre>\n<h4>Dovecot\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u8a2d\u5b9a\u7de8\u96c6<\/h4>\n<p>\u30e1\u30fc\u30eb\u306e\u53d7\u4fe1\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u00a0`dovecot`\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo apt install dovecot-common dovecot-imapd dovecot-pop3d<\/pre>\n<p><strong>\/etc\/dovecot\/dovecot.conf<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo vim \/etc\/dovecot\/dovecot.conf<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># \u30b3\u30e1\u30f3\u30c8\u89e3\u9664 & \u5909\u66f4\r\nlisten = *\r\n\r\n# \u6700\u5f8c\u5c3e\u306b\u8ffd\u52a0\r\ndisable_plaintext_auth = no<\/pre>\n<p><strong>\/etc\/dovecot\/conf.d\/10-auth.conf<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo vim \/etc\/dovecot\/conf.d\/10-auth.conf<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># \u30b3\u30e1\u30f3\u30c8\u89e3\u9664 & \u5909\u66f4\r\ndisable_plaintext_auth = no\r\n\r\n# \u5909\u66f4\r\nauth_mechanisms = plain login<\/pre>\n<p><strong>\/etc\/dovecot\/conf.d\/10-mail.conf<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo vim \/etc\/dovecot\/conf.d\/10-mail.conf<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># \u5909\u66f4\r\nmail_location = maildir:~\/Maildir<\/pre>\n<p><strong>\/etc\/dovecot\/conf.d\/10-master.conf<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo vim \/etc\/dovecot\/conf.d\/10-master.conf<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">service auth {\r\n  ...\u7701\u7565\r\n\r\n  # \u30b3\u30e1\u30f3\u30c8\u89e3\u9664 & \u5909\u66f4\r\n  # Postfix smtp-auth\r\n    unix_listener \/var\/spool\/postfix\/private\/auth {\r\n      mode = 0666\r\n      user = postfix\r\n      group = postfix\r\n    }<\/pre>\n<p><strong>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo vim \/etc\/dovecot\/conf.d\/10-ssl.conf<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># \u30b3\u30e1\u30f3\u30c8\u89e3\u9664 &amp; \u5909\u66f4\r\nssl = no\r\n\r\n# \u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\n#ssl_cert = &lt;\/etc\/dovecot\/private\/dovecot.pem\r\n#ssl_key = &lt;\/etc\/dovecot\/private\/dovecot.key<\/pre>\n<h4>Dovecot\u306e\u8a2d\u5b9a\u78ba\u8a8d<\/h4>\n<p>\u4e00\u901a\u308a\u8a2d\u5b9a\u5909\u66f4\u7d42\u308f\u308a\u307e\u3057\u305f\u306e\u3067\u3001doveconf\u306e\u8a2d\u5b9a\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ doveconf -n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># 2.3.7.2 (3c910f64b): \/etc\/dovecot\/dovecot.conf\r\n# Pigeonhole version 0.5.7.2 ()\r\n# OS: Linux 5.4.0-97-generic x86_64 Ubuntu 20.04.3 LTS\r\n# Hostname: (hostname)\r\nauth_mechanisms = plain login\r\ndisable_plaintext_auth = no\r\nlisten = *\r\nmail_location = maildir:~\/Maildir\r\nmail_privileged_group = mail\r\nnamespace inbox {\r\n  inbox = yes\r\n  location =\r\n  mailbox Drafts {\r\n    special_use = \\Drafts\r\n  }\r\n  mailbox Junk {\r\n    special_use = \\Junk\r\n  }\r\n  mailbox Sent {\r\n    special_use = \\Sent\r\n  }\r\n  mailbox \"Sent Messages\" {\r\n    special_use = \\Sent\r\n  }\r\n  mailbox Trash {\r\n    special_use = \\Trash\r\n  }\r\n  prefix =\r\n}\r\npassdb {\r\n  driver = pam\r\n}\r\nprotocols = \" imap pop3\"\r\nservice auth {\r\n  unix_listener \/var\/spool\/postfix\/private\/auth {\r\n    group = postfix\r\n    mode = 0666\r\n    user = postfix\r\n  }\r\n}\r\nssl = no\r\nssl_client_ca_dir = \/etc\/ssl\/certs\r\nssl_dh = # hidden, use -P to show it\r\nuserdb {\r\n  driver = passwd\r\n}<\/pre>\n<p>dovecot\u3092\u518d\u8d77\u52d5\u3057\u3066\u8a2d\u5b9a\u3092\u53cd\u6620\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo systemctl restart dovecot<\/pre>\n<p>dovecot\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u78ba\u8a8d\u3001Active: active (running) \u306e\u30b9\u30c6\u30fc\u30bf\u30b9<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ systemctl status dovecot<\/pre>\n<p>netstat\u30b3\u30de\u30f3\u30c9\u4f7f\u7528\u306e\u305f\u3081\u3001net-tools\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ sudo apt install net-tools<\/pre>\n<p>\u30dd\u30fc\u30c8\u306e\u78ba\u8a8d\u3002POP3\u7528110\u756a\u30dd\u30fc\u30c8\u3001IMAP4\u7528143\u756a\u30dd\u30fc\u30c8\u304c\u6709\u52b9\u72b6\u614b\u3092\u78ba\u8a8d<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ netstat -nat<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Active Internet connections (servers and established)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State\r\ntcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN\r\ntcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN<\/pre>\n<p>\u7d9a\u3044\u3066\u3001Postfix\u306eSASL\u8a8d\u8a3c\u8a2d\u5b9a\u3001\u30b5\u30d6\u30df\u30c3\u30b7\u30e7\u30f3\u30dd\u30fc\u30c8\u8a2d\u5b9a\u306a\u3069\u3092\u884c\u3044\u3001\u30e1\u30fc\u30eb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u306e\u300cThunderbird\u300d\u3092\u7528\u3044\u3066\u63a5\u7d9a\u30c6\u30b9\u30c8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/?p=11221\">Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix SASL\u8a8d\u8a3c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306eUbuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 Postfix\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u7d9a\u304d\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001Dovecot\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u30e1\u30cb\u30e5\u30fc Ubuntu 20.04 LTS \u30b5\u30fc\u30d0\u69cb\u7bc9 \u2013 \u521d\u671f\u30bb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11192,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[248],"tags":[221,44,45,293],"class_list":{"0":"post-11218","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-ubuntu","8":"tag-linux","9":"tag-web","11":"tag-293"},"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11218"}],"version-history":[{"count":6,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11218\/revisions"}],"predecessor-version":[{"id":11262,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11218\/revisions\/11262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/media\/11192"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}