Hi,

this is more related to cyrus-sasl than cyrus-imapd. If I put the following lines into my imapd.conf prepending sasl_ to each option, the imapd greatly authenticates users agains a mysql database as wanted.
This was not that hard to setup and worked after short time.

pwcheck_method: auxprop
auxprop_plugin: mysql
allowanonymouslogin: no
allowplaintext: yes
mech_list: PLAIN LOGIN
mysql_user: auser
mysql_passwd: apassword
mysql_hostnames: localhost
mysql_database: admin
mysql_statement: select password from SASLUser where login='%u' and domain='%r' and IMAP='YES'
mysql_verbose: yes

I now wanted to let sendmail-8.12.6 authenticate against the same users using the same mysql database. Therefore I compiled sendmail with -DSASL=2 and linked it against -lsasl2. That also worked at once.
If I setup sendmail in /usr/lib/sasl/Sendmail.conf to authenticate against /etc/sasldb2 all works so sasl seems to be compiled into sendmail correctly. After adding a user with saslpasswd2 with a password, sendmail could authenticate against the sasldb2 file. But if I put the above lines into /usr/lib/sasl/Sendmail.conf I cannot get it to work. First I thought that I had to configure it in /usr/lib/sasl2/Sendmail.conf but after extensivley using truss utility I saw that sendmail tried to read /usr/lib/sasl/Sendmail.conf

Here is, how far I got it to work:

First I saw in the truss output that mysql says something like "Access denied for user root@localhost (using password: NO)"
So sendmail actually tries to connect to the database and seems to read the options auxprop_plugin and pwcheck_method correctly. Because I was not able to get the configuration done and to let sendmail use the specified user and password, I changed the privileges of the mysql-user root so that sendmail can login to mysql with root@localhost without password. The next thing which then happens is, that sendmail successfully connects to mysql but then truss output says that mysql answers with something like "No database selected.".
As it seems to me, sendmail completely ignores all options other than auxprop_plugin and pwcheck_method. These two options are interpreted correctly but all other mysql related options get ignored. Why ? What am I doing wrong ? Would be great, if anybody, who has such setup running with sendmail could post here, how it is done and how one can tell sendmail to read the complete Sendmail.conf options correctly.







Reply via email to