{"id":1269,"date":"2018-09-27T15:09:06","date_gmt":"2018-09-27T07:09:06","guid":{"rendered":"http:\/\/www.5x44.cn\/?p=1269"},"modified":"2018-10-31T17:32:26","modified_gmt":"2018-10-31T09:32:26","slug":"%e9%82%ae%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.5x44.cn\/?p=1269","title":{"rendered":"\u90ae\u4ef6\u670d\u52a1\u5668\u914d\u7f6e"},"content":{"rendered":"<p>postfix+dovecot+mysql+ssl<\/p>\n<p>\u914d\u7f6e\u4e3b\u8981\u662f\u6839\u636e\u8be5\u7f51\u7ad9\u4e0a\u7684\u6b65\u9aa4\u8fdb\u884c\u7684\uff0c\u81ea\u5df1\u7565\u505a\u6539\u52a8\uff0c\u53c2\u8003\u6587\u732e\uff1a<\/p>\n<p><a href=\"http:\/\/www.postfix.org\/postconf.5.html\">postfix\u914d\u7f6e\u53c2\u6570<\/a><\/p>\n<p class=\"content-title Tutorial-header\"><a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin#-step-4-configure-dovecot\">How To Configure a Mail Server Using Postfix, Dovecot, MySQL, and SpamAssassin<\/a><\/p>\n<p><a href=\"https:\/\/www.akadia.com\/services\/postfix_separate_mailboxes.html\">Postfix &#8211; Hosting Multiple Domains with Virtual Accounts<\/a><\/p>\n<p><a href=\"https:\/\/wiki2.dovecot.org\/HowTo\/PostfixDovecotLMTP\">Postfix and Dovecot LMTP<\/a><\/p>\n<h1>\u4e3b\u8981\u9047\u5230\u7684\u95ee\u9898\u548c\u89e3\u51b3\u8fc7\u7a0b\uff1a<\/h1>\n<h2>postfix\u90e8\u5206<\/h2>\n<p><strong>\u7f16\u8bd1\u547d\u4ee4(\u8fd9\u662f\u6211\u6700\u521d\u7684\u7f16\u8bd1\u547d\u4ee4\uff0c\u540e\u6765\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u9047\u5230\u4e86\u4e00\u4e9b\u95ee\u9898\uff0c\u6709\u6240\u4fee\u6539)\uff1a<\/strong><\/p>\n<p><strong>[server@a]#make -f Makefile.init makefiles shared=yes dynamicmaps=yes CCARGS=&#8221;-DHAS_MYSQL -I\/usr\/local\/mysql\/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I\/usr\/include\/sasl&#8221; AUXLIBS=&#8221;<span style=\"color: #ff0000;\">-L\/usr\/local\/BerkeleyDB\/lib -ldb<\/span> -L\/usr\/lib64\/sasl2 -lsasl2&#8243; AUXLIBS_MYSQL=&#8221;-L\/usr\/local\/mysql\/lib -lmysqlclient -lz -lm&#8221;<\/strong><\/p>\n<p><strong>[server@a]#make<\/strong><\/p>\n<p><strong>Q<\/strong><strong>\uff1a<\/strong><\/p>\n<p>[root@blog postfix-3.3.1]# make -f Makefile.init makefiles &#8216;CCARGS=-DHAS_MYSQL -I\/usr\/local\/mysql\/include&#8217; &#8216;AUXLIBS_MYSQL=-L\/usr\/local\/mysql\/lib -lmysqlclient -lz -lm&#8217;<\/p>\n<p>make -f Makefile.in MAKELEVEL= Makefiles<\/p>\n<p>(echo &#8220;# Do not edit &#8212; this file documents how Postfix was built for your machine.&#8221;; \/bin\/sh makedefs) &gt;makedefs.tmp<\/p>\n<p>No &lt;db.h&gt; include file found.<\/p>\n<p>Install the appropriate db*-devel package first.<\/p>\n<p>make: *** [Makefiles] Error 1<\/p>\n<p>make: *** [makefiles] Error 2<\/p>\n<p>&nbsp;<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\uff081\uff09\u8be5\u9519\u8bef\u662f\u63d0\u793a\u7f3a\u5c11Berkeley DB\uff08\u73b0\u5728\u9636\u6bb5\u5df2\u7ecf\u4f7f\u7528db5\u4e86\uff09\uff0c\u4f7f\u7528CCARGS=&#8221;-DNO_DB&#8221;\u7f16\u8bd1\u53c2\u6570\uff0c\u9009\u62e9\u4e0d\u4f7f\u7528Berkeley DB\u3002[root@blog postfix-3.3.1]# make -f Makefile.init makefiles &#8216;CCARGS=-DNO_DB -DHAS_MYSQL -I\/usr\/local\/mysql\/include&#8217; &#8216;AUXLIBS_MYSQL=-L\/usr\/local\/mysql\/lib -lmysqlclient -lz -lm&#8217;<\/p>\n<p><strong>Q<\/strong><strong>\uff1a<\/strong><\/p>\n<p>dict_db.c:758:2: error: #error &#8220;Unsupported Berkeley DB version&#8221;<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\u5b89\u88c5\u88c5db5-devel\uff08Berkeley DB\uff0cpostfix\u5b98\u65b9\u6587\u6863\u4e0a\u7684\u94fe\u63a5\u662f\u6307\u5411oracle\u7684\uff0c\u6700\u8fd1\u7248\u672c\u662f18.x.x\uff0c\u5b89\u88c5\u540e\u7f16\u8bd1postfix\u4f1a\u63d0\u793a\u201c\u4e0d\u652f\u6301\u8be5\u7248\u672c\u201d\uff0c\u6839\u636e\u7f51\u4e0a\u627e\u5230\u7684\u63d0\u793a\u6211\u67e5\u770b\u4e86.\/postfix-3.3.1\/src\/util\/dict_db.c\u6587\u4ef6\uff0c\u4f3c\u4e4epostfix3.3.x\u53ea\u652f\u6301\u5230\u7248\u672c6\uff0c\u800coracle\u7f51\u7ad9\u4e0a\u662f\u4e0d\u63d0\u4f9b5\u30016\u7248\u672c\u3002\u6211\u7528\u7684\u53d1\u884c\u7248\u672c\u662fCentOS Linux release 7.5.1804\uff0c\u6e90\u5b89\u88c5\u53ea\u6709db5\u3002\uff09<strong>yum install libdb<\/strong>,\u63d0\u793a\u5df2\u7ecf\u662f\u6700\u8fd1\u7248\u672c\uff0c\u7136\u540e<strong>yum install libdb-devel<\/strong><\/p>\n<p><strong>Q<\/strong><strong>\uff1a<\/strong><br \/>\n\/var\/log\/messages\u4e2d\u63d0\u793a\u5982\u4e0b\u9519\u8bef\uff1a<br \/>\npostfix\/smtpd[14519]: sql_select option missing<br \/>\npostfix\/smtpd[14519]: auxpropfunc error no mechanism available<br \/>\n<strong>A:<\/strong><\/p>\n<p>\u5206\u6790\uff1a<br \/>\n\u7531\u4e8e\u6ca1\u914d\u7f6ecyrus-sasl-sql\uff0c\u6240\u4ee5\u4f1a\u6709\u8fd9\u4e2a\u9519\u8bef\u63d0\u793a\uff01<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\n\u5378\u8f7d:cyrus-sasl-sql<br \/>\n<strong>Q<\/strong><strong>\uff1a<\/strong><br \/>\n\/var\/log\/messages\u4e2d\u63d0\u793a\u5982\u4e0b\u9519\u8bef\uff1a<br \/>\npostfix\/smtpd[14459]: auxpropfunc error invalid parameter supplied<br \/>\n<strong>A:<\/strong><\/p>\n<p>\u5206\u6790\uff1a<br \/>\n\u7531\u4e8e\u6ca1\u914d\u7f6ecyrus-sasl-ldap\uff0c\u6240\u4ee5\u4f1a\u6709\u8fd9\u4e2a\u9519\u8bef\u63d0\u793a\uff01<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\n\u5378\u8f7d\uff1acyrus-sasl-ldap<\/p>\n<p><strong>Q:<\/strong>\u4e0d\u80fd\u53d1\u90ae\u4ef6\uff0c\u65e5\u5fd7\u5982\u4e0b\uff1a<\/p>\n<pre>Sep 28 10:34:49 [localhost] postfix\/smtpd[92778]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled\r\n\r\nSep 28 10:34:49 [localhost] postfix\/smtpd[92778]: warning: TLS has been selected, but TLS support is not compiled in\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtpd[92778]: connect from unknown[60.219.151.226]\r\n\r\nSep 28 10:34:50 [localhost] postfix\/trivial-rewrite[92782]: warning: do not list domain 5x44.cn in BOTH mydestination and virtual_mailbox_domains\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtpd[92778]: warning: unknown smtpd restriction: \"reject_unauth_destionation\"\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtpd[92778]: NOQUEUE: reject: RCPT from unknown[60.219.151.226]: 451 4.3.5 Server configuration error; from=&lt;hank@5x44.cn&gt; to=&lt;skiron_liu@163.com&gt; proto=ESMTP helo=&lt;eleven-PC&gt;\r\n\r\nSep 28 10:34:50 [localhost] postfix\/cleanup[92784]: 66C2481BFC: message-id=&lt;20180928023450.66C2481BFC@mail.5x44.cn&gt;\r\n\r\nSep 28 10:34:50 [localhost] postfix\/qmgr[92495]: 66C2481BFC: from=&lt;double-bounce@mail.5x44.cn&gt;, size=850, nrcpt=1 (queue active)\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtpd[92778]: disconnect from unknown[60.219.151.226] ehlo=1 mail=1 rcpt=0\/1 quit=1 commands=3\/4\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtpd[92778]: connect from unknown[180.76.51.216]\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtp[92786]: warning: host mail.5x44.cn[180.76.51.216]:25 greeted me with my own hostname mail.5x44.cn\r\n\r\nSep 28 10:34:50 [localhost] postfix\/smtp[92786]: warning: host mail.5x44.cn[180.76.51.216]:25 replied to HELO\/EHLO with my own hostname mail.5x44.cn\r\n\r\n<\/pre>\n<p><strong>A:<\/strong><\/p>\n<p>\u5206\u6790\uff0c\u65e5\u5fd7\u6709\u4e24\u6761\u8b66\u544a\uff0c\u5bfc\u81f4\u4e0d\u80fd\u53d1\u90ae\u4ef6\u7684\u539f\u56e0\u662f\u201cwarning: TLS has been selected, but TLS support is not compiled in\u201d\u8fd9\u6761\u8b66\u544a\u3002\u91cd\u65b0\u770b\u4e86\u4e00\u4e0b\u7f16\u8bd1\u9009\u9879\uff0c\u6ca1\u5f00\u542fTLS\uff0c\u6dfb\u52a0\u7f16\u8bd1\u9009\u9879\u540e\u89e3\u51b3\u95ee\u9898\uff0c\u7ea2\u8272\u90e8\u5206\u662f\u6dfb\u52a0\u7684\u3002\u5bf9\u4e8e-lssl -lcrypto\u8fd9\u4e24\u4e2a\u5f00\u5173\u6211\u4e5f\u4e0d\u6e05\u695a\u662f\u4ec0\u4e48\u7528\u5904\uff0c\u4e0d\u8fc7\u5728makedefs\u91cc\u5199\u4e86\u3002\u6211\u5c31\u6dfb\u52a0\u4e0a\u4e86\u3002<\/p>\n<pre>make -f Makefile.init makefiles shared=yes dynamicmaps=yes CCARGS=\"<span style=\"color: #ff0000;\">-DUSE_TLS<\/span> -DHAS_MYSQL -I\/usr\/local\/mysql\/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I\/usr\/include\/sasl\" AUXLIBS=\"<span style=\"color: #ff0000;\">-lssl -lcrypto<\/span> -L\/usr\/lib64\/sasl2 -lsasl2\" AUXLIBS_MYSQL=\"-L\/usr\/local\/mysql\/lib -lmysqlclient -lz -lm\"\r\n<\/pre>\n<p><strong>Q:<\/strong>\u6536\u4e0d\u5230\u90ae\u4ef6<br \/>\npostfix\/virtual[48712]: fatal: bad string length 0 &lt; 1: virtual_mailbox_base =<br \/>\n<strong>A:<\/strong><br \/>\n\u6ca1\u8bbe\u7f6evirtual_mailbox_base\u53c2\u6570\uff0c\u8fd9\u4e2a\u53c2\u6570\u662f\u672c\u5730\u90ae\u7bb1\u4f4d\u7f6e\u3002\u5982\uff1a\/var\/mail\/vhosts<br \/>\n<strong>Q:<\/strong><br \/>\npostfix\/virtual[49949]: error: open \/etc\/postfix\/mysql-virtual-mailbox-maps.cf: Permission denied<br \/>\n<strong>A:<br \/>\n<\/strong>\u5c06\u8be5\u6587\u4ef6\u7684\u6743\u9650\u8bbe\u7f6e\u6210&lt;postfixgroup&gt;\u7ec4\u53ef\u8bfb\u3002\u56e0\u4e3apostfix\u542f\u52a8\u662f\u9700\u8981root\u7528\u6237\uff0c\u4f46\u662f\u5b83\u7684\u7ec4\u4ef6\u662f\u9700\u8981postfix\u6307\u5b9a\u7684\u7528\u6237\u542f\u52a8\u3002<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>postfix\/virtual[51225]: warning: recipient eleven@5&#215;44.cn: not found in virtual_uid_maps<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\u56e0\u4e3a\u865a\u62df\u7528\u6237\uff0c\u6ca1\u6709\u672c\u5730\u7cfb\u7edf\u8d26\u6237\uff0c\u4f46\u662f\u90ae\u4ef6\u9700\u8981\u6709\u4e00\u4e2a\u6240\u6709\u8005\uff0c\u914d\u7f6e\u6240\u6709\u865a\u62df\u7528\u6237\u4f7f\u7528\u4e00\u4e2auid\u548cgid\uff0c\u4e5f\u53ef\u4ee5\u5206\u522b\u4e3a\u6bcf\u4e2a\u865a\u62df\u7528\u6237\u914d\u7f6e\u4e00\u4e2auid\u548cgid\u3002<\/p>\n<p>virtual_uid_maps = static:1001<br \/>\nvirtual_gid_maps = static:1001<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>postfix\/trivial-rewrite[58368]: warning: do not list domain 5&#215;44.cn in BOTH mydestination and virtual_mailbox_domains<\/p>\n<p>A:<\/p>\n<p>\u8fd9\u4e2a\u8b66\u544a\u662f\u8bf4\u4e0d\u8981\u628a5&#215;44.cn\u8fd9\u4e2a\u57df\u540d\u540c\u65f6\u653e\u5728mydestination\u548cvirtual_mailbox_domains\u4e2d\u3002\u6211\u5728main.cf\u6587\u4ef6\u4e2d\u628amydestination\u90a3\u884c\u6ce8\u91ca\u6389\u5c31\u89e3\u51b3\u4e86\u3002<\/p>\n<p>Q\uff1a\u6536\u90ae\u4ef6\u90fd\u6536\u5230\u4e00\u4e2a\u540d\u4e3a\u201c1\u201d\u7684\u6587\u4ef6\u4e2d\u4e86\u3002<\/p>\n<p>A\uff1a\u56e0\u4e3a\u6211\u7684<code>postmap -q eleven@5x44.cn mysql:.\/mysql-virtual-mailbox-maps.cf<\/code>\u8fd4\u56de\u5c31\u662f1\uff0c\u8fd8\u6709\u5c31\u662f\u6211\u7684dovecot\u8bbe\u7f6e\u7684\u662fmaildir\u7684\u65b9\u5f0f\uff0c\u800cpostfix\u4f7f\u7528mbox\u65b9\u5f0f\uff08mbox\u4f1a\u628a\u6240\u6709\u7684\u90ae\u4ef6\u5185\u5bb9\u90fd\u5199\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f18\u5199\u662f\u5199\u5165\u901f\u5ea6\u6bd4\u8f83\u5feb\uff0c\u4f46\u68c0\u7d22\u90ae\u4ef6\u6162 \uff1b\u800cmaildir\u4f1a\u5efa\u7acb\u4e0d\u540c\u7684\u6587\u4ef6\uff0c\u4f18\u70b9\u68c0\u7d22\u5feb\uff0c\u4e0d\u5bb9\u6613\u4e22\u5931\u6587\u4ef6\uff0c\u4f46\u5982\u679c\u786c\u76d8\u7684\u6587\u4ef6\u7cfb\u7edf\u4e0d\u652f\u6301\u592a\u591a\u6587\u4ef6\u7684\u8bdd\u8fd9\u4f1a\u662f\u4e2a\u95ee\u9898\u3002\u5173\u4e8emaildir\u548cmbox\u7684\u7279\u70b9\u5c31\u4e0d\u8be6\u7ec6\u89e3\u91ca\u4e86\u3002\uff09\u3002\u5f00\u59cb\u6211\u60f3\u66f4\u6539mysql-virtual-mailbox-maps.cf\u4e2d\u7684\u67e5\u8be2\u8bed\u53e5query = SELECT &#8216;%d\/%u&#8217; FROM virtual_users WHERE email=&#8217;%s&#8217;\uff08%d\u4ee3\u8868\u57df\u540d\uff0c%u\u4ee3\u8868\u7528\u6237\u540d\uff0c%s\u4ee3\u8868\u8f93\u5165\u7684\u67e5\u8be2\u5b57\u7b26\uff09\u7684\u8bed\u53e5\uff0c\u8ba9postfix\u76f4\u63a5\u628a\u90ae\u4ef6\u5199\u6210maildir\u683c\u5f0f\uff08POSTFIX\u662f\u652f\u6301\u7684\uff09\uff0c\u4e0d\u8fc7\u540e\u6765\u611f\u89c9\u8fd9\u6837\u505a\u6bd4\u8f83\u5e76\u4e0d\u201c\u73a9\u7f8e\u201d\uff0c\u5bf9\u4e8e\u540e\u671f\u6539\u7528\u5176\u5b83POP\/IMAP\u670d\u52a1\u4e5f\u4e0d\u5229\uff0c\u4e8e\u662f\u4f7f\u7528LMTP\u7684\u65b9\u6cd5\u628a\u90ae\u4ef6\u53d1\u5f80LMTP\u670d\u52a1\u5668\uff0c\u518d\u7531LMTP\u670d\u52a1\u5668\u6536\u4fe1\uff08\u542c\u4e0a\u53bb\u66f4\u590d\u6742\u5176\u5b9e\u4e0d\u7136\uff0c\u56e0\u4e3aLMTP\u670d\u52a1\u5668\u5c31\u662fDOVECOT\u6765\u62c5\u5f53\u7684\uff0c\u8fd9\u6837\u5c31\u4f1a\u4e0d\u4ea7\u751f\u683c\u5f0f\u4e0d\u7b26\u800c\u5bfc\u81f4\u4e0d\u80fd\u6536\u5230\u90ae\u4ef6\u7684\u95ee\u9898\uff09\uff0c\u56e0\u4e3a\u4f7f\u7528\u4e86LMTP\u65b9\u5f0f\uff0c\u6240\u4ee5\u4e0d\u5728\u4f7f\u7528virtual_mailbox_maps\u8fd9\u4e2a\u53c2\u6570\u4e86\u3002<\/p>\n<pre>\u9996\u5148\uff0cvi \/etc\/postfix\/main.cf \u3002\u6dfb\u52a0virtual_transport = lmtp:unix:private\/dovecot-lmtp\r\n\u5176\u6b21\uff0cvi \/etc\/dovecot\/dovecot.conf\u3002\u5728protocols\u90e8\u5206\u6dfb\u52a0lmtp\uff0c\u534f\u8bae\u4e4b\u95f4\u7528\u7a7a\u683c\u9694\u5f00\r\n\u6700\u540e\uff0c\u7f16\u8f91service lmtp\u90e8\u5206\uff0cunix_listener \/var\/spool\/postfix\/private\/dovecot-lmtp\u3002unix_listener\u540e\u9762\u7684\u5730\u5740\u5f88\u91cd\u8981\uff0c\u9700\u8981\u548cpostfix\u4e2d\u8bbe\u7f6e\u4e00\u6837\u3002\r\n\u8be6\u7ec6\u8fc7\u7a0b\uff1ahttps:\/\/wiki2.dovecot.org\/HowTo\/PostfixDovecotLMTP\r\n<\/pre>\n<p><strong>Q\uff1a<\/strong>\u4e0d\u80fd\u53d1\u90ae\u4ef6<br \/>\nOct 7 14:18:17 [localhost] postfix\/smtpd[113318]: NOQUEUE: reject: RCPT from unknown[111.xxx.xxx.xxx]: 550 5.1.1 &lt;xxxxx@163.com&gt;: Recipient address rejected: User unknown in virtual mailbox table; from=&lt;eleven@5&#215;44.cn&gt; to=&lt;xxxxx@163.com&gt; proto=ESMTP helo=&lt;tt-PC&gt;<\/p>\n<p><strong>A:<\/strong>xxxxx@163.com\u662f\u6211\u81ea\u5df1\u7684\u90ae\u7bb1<\/p>\n<p>&nbsp;<\/p>\n<hr style=\"filter: progid:DXImageTransform.Microsoft.Shadow(color:#987cb9,direction:145,strength:15);\" size=\"1\" width=\"80%\" \/>\n<h2>dovecot\u90e8\u5206<\/h2>\n<p><strong>Q:<\/strong><\/p>\n<p>Sep 27 13:32:13 [localhost] dovecot: auth: Fatal: sql \/etc\/dovecot\/dovecot-sql.conf.ext: Can&#8217;t open configuration file \/etc\/dovecot\/dovecot-sql.conf.ext: No such file or directory<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\/etc\/dovecot\/conf.d\/auth-sql.conf.ext\u4e2dpassdb\u90e8\u5206args\u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u5199\u9519\u4e86\u3002<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>Sep 27 13:49:01 [localhost] dovecot: auth: Fatal: Unknown database driver &#8216;mysql&#8217;<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\u56e0\u4e3a\u6211\u7684dovecot\u662f\u7528yum\u5b89\u88c5\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528yum install dovecot-mysql\u6765\u5b89\u88c5mysql\u652f\u6301\u3002<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>Sep 27 14:20:13 [localhost] dovecot: imap(hank@5&#215;44.cn): Error: user hank@5&#215;44.cn: Initialization failed: Namespace &#8221;: mkdir(\/var\/mail\/vhosts\/5&#215;44.cn\/hank) failed: Permission denied (euid=1001(vmail) egid=1001(vmail) missing +w perm: \/var\/mail\/vhosts\/5&#215;44.cn, dir owned by 0:12 mode=0755)<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>5&#215;44.cn\u8fd9\u4e2a\u76ee\u5f55\u662f\u624b\u52a8\u5efa\u7acb\u7684\uff0c\u6240\u4ee5\u7528\u5ba2\u6237\u7aef\u6536\u90ae\u4ef6\u65f6\u4e0d\u80fd\u81ea\u52a8\u5efa\u7acb\u6587\u4ef6\uff0c\u624b\u52a8\u5220\u9664\u8fd9\u4e2a\u76ee\u5f55\u4e4b\u540e\uff0c\u518d\u6b21\u542f\u52a8\u90ae\u4ef6\u5ba2\u6237\u7aef\uff0c\u8ba9\u7cfb\u7edf\u81ea\u52a8\u5efa\u7acb\u76f8\u5e94\u76ee\u5f55.<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>Oct 16 15:35:57 [localhost] dovecot: lmtp(17740): Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\u5206\u6790\uff1a\u6ca1\u8bbe\u7f6epostmaster_address\u53c2\u6570\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a\u5728<strong>\/etc\/dovecot\/conf.d\/15-lda.conf<\/strong>\u4e2d\u628apostmaster_address\u53c2\u6570\u6dfb\u52a0\u4e0a\uff0c\u8fd9\u91cc\u5199\u7684\u662f\u90ae\u4ef6\u7ba1\u7406\u5458\u5730\u5740\uff0c\u53ef\u4ee5\u662f\u4efb\u4f55\u90ae\u4ef6\u5730\u5740\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u8ba9\u522b\u7684\u7ba1\u7406\u5458\u53ef\u4ee5\u8054\u7cfb\u5230\u4f60\u3002\u8fd8\u6709\u4e00\u79cd\u65b9\u6cd5\uff1ahttps:\/\/github.com\/mail-in-a-box\/mailinabox\/issues\/31#event-114690723 \u4e0d\u8fc7\u8fd9\u79cd\u65b9\u6cd5\u6211\u6ca1\u6d4b\u8bd5\u3002PS:\u6211\u4e2a\u4eba\u8ba4\u4e3a\u8fd9\u4e2a\u53c2\u6570\u4e0d\u662f\u5f88\u91cd\u8981\u7684\u53c2\u6570\uff0c\u4f46\u662f\u4e0d\u586b\u5199\uff0c\u5c31\u6536\u4e0d\u5230\u90ae\u4ef6\u3002<\/p>\n<hr style=\"filter: progid:DXImageTransform.Microsoft.Shadow(color:#987cb9,direction:145,strength:15);\" size=\"1\" width=\"80%\" \/>\n<h2>\u5176\u5b83\uff1a<\/h2>\n<p><strong>Q:<\/strong>CA\u7b7e\u7f72CSR\u8bf7\u6c42\u65f6\u62a5TXT_DB error number 2\u9519\u8bef<\/p>\n<p>\u5206\u6790\uff1a\u8fd9\u4e2a\u9519\u8bef\u662f\u7531\u4e8e\u4e0d\u80fd\u6709\u4e24\u4e2a\u8bc1\u4e66\u4e00\u6837\u3002<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\u4fee\u6539\/etc\/pki\/CA\/index.txt.attr\u6587\u4ef6\u4e2d\u7684unique_subject \u8bbe\u7f6e\u6210no\u3002<\/p>\n<p><strong>Q:<\/strong><\/p>\n<p>\u5982\u4f55\u5efa\u7acb\u8bc1\u4e66\u548c\u79d8\u94a5\uff1f<\/p>\n<p><strong>A:<\/strong><\/p>\n<p>\uff081\uff09\u4f7f\u7528\/etc\/pki\/tls\/misc\/CA -newca\u5efa\u7acb\u65b0\u7684\u6839\u8bc1\u4e66\uff0c\u7528\u4e8e\u7b7e\u7f72\u5176\u5b83\u8bc1\u4e66\uff0c\u8bc1\u660e\u662f\u7531\u81ea\u5df1\u6838\u53d1\u7684\u3002<\/p>\n<p>\uff082\uff09openssl req -new -nodes -keyout mailkey.pem -out mailreq.pem -days 365<\/p>\n<p>keyout\u540e\u662f\u79c1\u94a5\u6587\u4ef6\uff0cout\u540e\u662fCSR\u6587\u4ef6\uff08\u7528\u4e8e\u670d\u52a1\u5668\u7b7e\u7f72\u4f7f\u7528\uff09<\/p>\n<p>\uff083\uff09openssl ca -out mail_signed_cert.pem -infiles mailreq.pem<\/p>\n<p>mail_signed_cert.pem\u5c31\u662fCA\u7b7e\u7f72\u540e\u7684\u8bc1\u4e66\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>postfix+dovecot+mysql+ssl \u914d\u7f6e\u4e3b\u8981\u662f\u6839\u636e\u8be5\u7f51\u7ad9\u4e0a\u7684\u6b65\u9aa4\u8fdb\u884c\u7684\uff0c\u81ea\u5df1\u7565\u505a\u6539\u52a8\uff0c\u53c2\u8003\u6587\u732e\uff1a postfix\u914d\u7f6e\u53c2\u6570 How To Conf&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.5x44.cn\/?p=1269\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1269","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/1269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1269"}],"version-history":[{"count":27,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/1269\/revisions"}],"predecessor-version":[{"id":1308,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/1269\/revisions\/1308"}],"wp:attachment":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}