{"id":268,"date":"2012-07-06T13:54:55","date_gmt":"2012-07-06T05:54:55","guid":{"rendered":"http:\/\/www.sulabs.net\/?p=268"},"modified":"2012-07-06T14:06:30","modified_gmt":"2012-07-06T06:06:30","slug":"cyrus-sasl-authentication-failed-%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.sulabs.net\/?p=268","title":{"rendered":"Cyrus-sasl authentication failed \u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>Cyrus-Sasl \u662f\u4e00\u4e2a\u7b80\u6613\u5b89\u5168\u9a8c\u8bc1\u5c42\u8f6f\u4ef6\u5305\uff0c\u901a\u5e38\u7528\u4e8e\u642d\u914dPostfix \u505aSMTP\u9a8c\u8bc1\uff0c\u6700\u8fd1\u5728\u90e8\u7f72\u4e00\u53f0\u65b0\u7684\u90ae\u4ef6\u670d\u52a1\u5668\u65f6\uff0c\u7528Webmail \u767b\u9646\u53d1\u90ae\u4ef6\uff0c\u63a5\u6536\u5747\u65e0\u95ee\u9898\uff0c\u91c7\u7528\u5ba2\u6237\u7aef\u63a5\u53d7\u6b63\u5e38\uff0c\u53d1\u9001\u65f6\u5219\u63d0\u793a\u5982\u4e0b\u6240\u793a:<br \/>\nlocalhost postfix\/smtpd[32031]: connect from unknown[61.*.*.*]<br \/>\nlocalhost postfix\/smtpd[32031]: warning: unknown[61.*.*.*]: SASL LOGIN authentication failed: authentication failure<br \/>\n\u63d0\u793aSASL LOGIN\u9a8c\u8bc1 \u5931\u8d25\uff0c\u5728\u67e5\u9605\u5b98\u65b9\u6587\u6863\u540e\uff0c\u53d1\u73b0\u539f\u6765\u65b0\u7248\u672c\u7684 2.1.25 \u53c2\u6570\u505a\u4e86\u4e00\u4e9b\u53d8\u52a8( \u539f\u6765\u4f7f\u7528 2.1.22\u4e0d\u53d7\u5f71\u54cd )\uff0c\u53c2\u8003\u4ee5\u4e0b\u914d\u7f6e\u8fdb\u884c\u4fee\u6539<br \/>\n<!--more--><\/p>\n<pre class=\"brush: shell; gutter: true\">pwcheck_method: saslauthd\r\nmech_list: plain login pam\r\nallow_plaintext: true\r\nauxprop_plugin: sql\r\n#\u6307\u5b9asql\u63d2\u4ef6\r\nsql_engine: mysql\r\n#\u7c7b\u578b\u4e3amysql\u6570\u636e\u5e93\r\n\r\nsql_hostnames: localhost\r\nsql_user: sql\u7528\u6237\u540d\r\nsql_passwd: sql\u5bc6\u7801\r\nsql_database: sql\u6570\u636e\u5e93\u540d\r\nsql_select: select password from mail_user where login = &#039;%u@%r&#039;\r\n# SQL\u67e5\u8be2\u8bed\u53e5,\u6ce8\u610f\u7ed3\u5c3e\u7684\u90e8\u5206\r\n\r\n# sql_select: select password from mailbox where username=&#039;%u@%r&#039;\r\n# \u91c7\u7528 Extmail \u65f6\u7684\u67e5\u8be2\u8bed\u53e5<\/pre>\n<p>\u5176\u5b83\u5e38\u89c1\u9519\u8bef\u95ee\u9898\u7684\u5904\u7406\u65b9\u6cd5<\/p>\n<p>1. fatal: file \/etc\/postfix\/main.cf: parameter mail_owner:unknown user name value:postfix my networks=127.0.0.1\/8,10.1.1.0\/24<br \/>\n\u89e3\u51b3\u65b9\u6cd5 \u4fee\u6539 main.cf \u4fee\u6539 inte--inteface\u00a0= all<\/p>\n<p>2. fatal: file \/etc\/postfix\/main.cf: parameter mail_owner:unkonwn user name value:postfix myhostname=mail.abc.com mydomain=test.com myorigin=abc.com inet_interfaces =all<br \/>\n\u89e3\u51b3\u65b9\u6cd5: \u6267\u884c postconf -e mail_owner=postfix<\/p>\n<p>3.fatal: open database \/etc\/aliases.db :no such file or directory<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u6267\u884cnewaliase<\/p>\n<p>4.warning:dict_nis_init:NIS domain name not set - NIS lookups disabled<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u627e\u5230\/etc\/postfix\/main.cf \u6587\u4ef6\u4e2d\u7684 alias_maps = hash:\/etc\/aliases,nis:mail.aliases \u53bb\u6389<\/p>\n<p>5.warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms fatal: no SASL authentication mechanisms<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u901a\u5e38\u662f\u81ea\u884c\u5b89\u88c5sasl \u540elib\u5e93\u8def\u5f84\u53d8\u5316\uff0c\u4f5c\u4e2a\u8f6f\u8fde\u63a5\u3000ln -s \/usr\/local\/sasl2\/lib\/sasl2 \/usr\/lib\/sasl2<br \/>\n64\u4f4d\u7cfb\u7edf\u3000ln -s \/usr\/local\/sasl2\/lib\/sasl2 \/usr\/lib64\/sasl2<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cyrus-Sasl \u662f\u4e00\u4e2a\u7b80\u6613\u5b89\u5168\u9a8c\u8bc1\u5c42\u8f6f\u4ef6\u5305\uff0c\u901a\u5e38\u7528\u4e8e\u642d\u914dPostfix \u505a &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/www.sulabs.net\/?p=268\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268"}],"version-history":[{"count":4,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":270,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions\/270"}],"wp:attachment":[{"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sulabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}