Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 2004 16:14:15 -0400 (EDT)
From:      "Aaron Peterson" <aaron@alpete.com>
To:        "Brent Wiese" <brently@bjwcs.com>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: Postfix - Sasl - mysql
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>

next in thread | previous in thread | raw e-mail | index | archive | help

>> > 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'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2278.206.114.147.90.1081368855.squirrel>