From owner-freebsd-questions@FreeBSD.ORG Wed Jul 28 07:27:37 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 846FA16A4D8 for ; Wed, 28 Jul 2004 07:27:37 +0000 (GMT) Received: from hotmail.com (bay9-f34.bay9.hotmail.com [64.4.47.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69CEA43D3F for ; Wed, 28 Jul 2004 07:27:37 +0000 (GMT) (envelope-from lancelotest@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 28 Jul 2004 00:27:37 -0700 Received: from 70.68.235.3 by by9fd.bay9.hotmail.msn.com with HTTP; Wed, 28 Jul 2004 07:27:36 GMT X-Originating-IP: [70.68.235.3] X-Originating-Email: [lancelotest@hotmail.com] X-Sender: lancelotest@hotmail.com From: "¿WÃÈ LanceLoTest" To: freebsd-questions@freebsd.org Date: Wed, 28 Jul 2004 00:27:36 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 28 Jul 2004 07:27:37.0255 (UTC) FILETIME=[5B73A370:01C47474] Subject: Postfix + SASL + MySQL,,What did I miss >"< X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 07:27:37 -0000 Hi, everyone Originally, I used /usr/local/etc/sasldb2 to store accounts/passwords(plain text) data, and used Mozilla Thunderbird as my MUA. I can pass the SASL authentication(both smtp and imap) successfully. After that, I wanted to use MySQL to store accounts/passwords(plain text), but I got fail of SASL authentication. I am using FreeBSD 5.2 release, and have complete installed these softwares from port: cyrus-imapd-2.2.6 cyrus-sasl-2.1.19 cyrus-sasl-saslauthd-2.1.19 postfix-2.1.4,1 (build with MySQL) I follow these instructions to set up smtpd.conf http://lists.freebsd.org/mailman/htdig/freebsd-questions/2004-April/042847.html http://lists.freebsd.org/pipermail/freebsd-questions/2004-March/039296.html I have been searched and read many documents on mail-listing and google, but I still don't know what I miss @@, and /var/log/maillog doesn't provide enough information to me to solve the problem. I am sure that I have enter correct accounts/passwords. Please note that it works well with /usr/local/etc/sasldb2, but not MySQL >"< It seems to me that it doesn't talk to MySQL at all, because I tried to use incorrect sql_user/sql_passwd in smtpd.conf, it gived me the same log in /var/log/maillog Please give me some hints to fix this problem, I have tried it for several weeks, kind of tired, but I don't want to give up. Thank you in advance. These are some logs, and configurations: (the accounts and password are real, you can test it if you want) # cat /var/log/maillog Jul 27 21:09:01 me postfix/smtpd[771]: connect from S01060050fc412395.vf.shawcable.net[70.68.235.3] Jul 27 21:09:04 me postfix/smtpd[771]: warning: SASL authentication failure: Password verification failed Jul 27 21:09:04 me postfix/smtpd[771]: warning: S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL PLAIN authentication failed Jul 27 21:09:05 me postfix/smtpd[771]: warning: S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL LOGIN authentication failed Jul 27 21:09:11 me postfix/smtpd[771]: lost connection after AUTH from S01060050fc412395.vf.shawcable.net[70.68.235.3] Jul 27 21:09:11 me postfix/smtpd[771]: disconnect from S01060050fc412395.vf.shawcable.net[70.68.235.3] mysql> use mail; mysql> select * from user; +----+----------+----------+---------+---------------+------------------------+-------- | ID | USERNAME | PASSWORD | FORWARD | DOMAIN | MAIL | FILTER +----+----------+----------+---------+---------------+------------------------+-------- | 1 | test | zzzzzz | test | me.uos.idv.tw | test@me.uos.idv.tw | OK | 2 | cyrus | zzzzzz | cyrus | me.uos.idv.tw | cyrus@me.uos.idv.tw | OK | 3 | kkk | zzzzzz | kkk | me.uos.idv.tw | kkk@mail.me.uos.idv.tw | OK +----+----------+----------+---------+---------------+------------------------+-------- 3 rows in set (0.02 sec) I have these parameters in main.cf: broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, permit_auth_destination, permit_mx_backup, check_relay_domains, reject_unknown_recipient_domain, reject_non_fqdn_recipient, reject_unauth_destination, reject smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_pipelining reject_unknown_client # cat /usr/local/lib/sasl2/smtpd.conf pwcheck_method: auxprop auxprop_plugin: sql mech_list: plain login sql_engine: mysql sql_hostnames: localhost sql_user: mail sql_passwd: secret sql_database: mail sql_select: select PASSWORD from user where USERNAME='%u' sql_verbose: true I have tried to change auxprop_plugin: mysql and USERNAME='%u@%r' as well. _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/