From owner-freebsd-questions@FreeBSD.ORG Wed Apr 7 13:35:19 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 C689C16A4CE for ; Wed, 7 Apr 2004 13:35:19 -0700 (PDT) Received: from ex-nihilo-llc.com (ex-nihilo-llc.com [206.114.147.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 918A643D48 for ; Wed, 7 Apr 2004 13:35:19 -0700 (PDT) (envelope-from aaron@alpete.com) Received: from mail.alpete.com (localhost [127.0.0.1]) by ex-nihilo-llc.com (Postfix) with SMTP id E62C4131; Wed, 7 Apr 2004 16:14:14 -0400 (EDT) Received: from 206.114.147.90 (proxying for 205.204.186.3) (SquirrelMail authenticated user aaron@alpete.com) by mail.alpete.com with HTTP; Wed, 7 Apr 2004 16:14:15 -0400 (EDT) Message-ID: <2278.206.114.147.90.1081368855.squirrel@mail.alpete.com> In-Reply-To: <20040407193232.BHDM6191.fed1rmmtao09.cox.net@SAMBA> References: <4073A341.2040006@elvandar.org> <20040407193232.BHDM6191.fed1rmmtao09.cox.net@SAMBA> Date: Wed, 7 Apr 2004 16:14:15 -0400 (EDT) From: "Aaron Peterson" To: "Brent Wiese" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: freebsd-questions@freebsd.org Subject: RE: Postfix - Sasl - mysql X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: aaron@alpete.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 20:35:19 -0000 >> > I added the cyrus-sasl2 port (also chose support for it in >> postfix port) >> > "WITH_MYSQL". >> > >> > No go. >> > >> > I added the following lines to >> /usr/local/lib/sasl2/smtpd.conf (found this >> > in another faq/tutorial, so it may be incorrect) >> > >> > sasl_pwcheck_method: auxprop >> > sasl_auxprop_plugin: sql >> sql_engine: mysql >> mech_list: login plain crammd6 digestmd5 >> > sql_user: postfix-user >> > sql_passwd: thepassword >> > sql_database: postfix >> > sql_statement: SELECT password FROM mailbox WHERE username = '%u' >> > sql_verbose: yes I used those instructions, although I modified some for my specific configuration. the "username" field in my database is "user@virtualdomain.com" however. I had to create a plain-text password field that i modified the php scripts to create as part of the normal process of things because the auxprop plugin alone didn't understand anything but plain text. you can use the PAM sasl plugin from what I understand, and configure pam to use mysql with it's native plugin in order to use encrypted passwords in the mysql database. I haven't looked at this stuff in a while, so my memory isn't so clear and things may have changed... Here's my working smtpd.conf: # smtpd.conf pwcheck_method: auxprop auxprop_plugin: sql mech_list: plain login sql_engine: mysql sql_hostnames: localhost sql_user: postfix-user sql_passwd: thepassword sql_database: postfix sql_select: select pass_plain from mailbox where username='%u@%r'