Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cyrus-sasl configuration

Status
Not open for further replies.

Borvik

Programmer
Jan 2, 2002
1,392
US
I'm trying to setup a postfix server with cyrus-sasl and a MySQL database backend for everything (on FC4).

I was able to successfully get postfix installed with MySQL support (from source RPM).
I was able to successfully (I think) get cyrus-sasl installed with MySQL support (from source RPM as well). These are the packages installed: cyrus-sasl-2.1.20-5 cyrus-sasl-sql-2.1.20-5 cyrus-sasl-md5-2.1.20-5 cyrus-sasl-devel-2.1.20-5 cyrus-sasl-plain-2.1.20-5

I have Postfix recognizing cyrus as I'm getting a correct response from EHLO, but am unable to get it to authenticate a user.

I've just noticed I've got two smtpd.conf files. One located in /usr/lib/sasl2/smtpd.conf and the other at /usr/lib/sasl/smtpd.conf.

Here are the contents of those files:
[sasl2/stmpd.conf]
Code:
pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
sql_hostnames: localhost
sql_user: <user>
sql_passwd: <password>
sql_database: <dbase>
sql_verbose: yes
sql_select: SELECT passwd FROM dbmail_users WHERE userid='%u@%r'

[sasl/smtpd.conf]
Code:
pwcheck_method: saslauthd
saslauthd_version: 2

The database has the user logon name stored in dbmail_users.userid as plain text. The password is stored in dmail_users.passwd as an MD5 hash.

I know the username and password I'm typing in are correct - but it doesn't authenticate.

Anyone know what might be going on? Also what are the options "%u@%r" in the select statement - I've been doing some searching and I can't find what they mean, and what are the other options (in case that's what's wrong)?
 
Ok I got it working!

I switched the mech_list option with the sql_engine option, and stuck with PLAIN and LOGIN. I also changed the %u@%r to just %u. It would appear %u@%r is user@realm, and just user works for what I have planned.

I'm not sure what led to me to try switching those options around, or what caused that to work - but apparently it did.

Cheers.
 
Oh - and I changed the method of storing the password in the database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top