Hello, I had some problems with running postfix and Cyrus SASL on openSuSE 10 The first problem i ran into was that although Cyrus SASL was compiled with mysql support it didn't know anything about mysql. this is my proof Nov 9 22:18:20 aka-build postfix/smtpd[23244]: SQL engine 'mysql' not supported Nov 9 22:18:20 aka-build postfix/smtpd[23244]: auxpropfunc error no mechanism available Nov 9 22:18:20 aka-build postfix/smtpd[23244]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql I recompiled the cyrus-sasl package and I added to the --with-mysql option in the spec file also the path to the headers making it --with-mysql=/usr/include/mysql After doing this mysql queries worked Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql auxprop plugin using mysql engine Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin Parse the username aka@lumina.ro Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin try and connect to a host Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin Parse the username aka@lumina.ro Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin try and connect to a host Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin Parse the username aka@lumina.ro Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin try and connect to a host Nov 16 00:02:54 aka-build postfix/smtpd[4790]: sql plugin trying to open db 'postfix' on host 'localhost' Now my problem is another one. In my database I have the passwords stored with crypt md5 (system) not the one from mysql (it was easy to migrate from shadow to mysql) So I applied this patch to cyrus-sasl -----------------------begin patch *** lib/checkpw.c.orig Thu Feb 13 14:07:23 2003 --- lib/checkpw.c Thu Feb 13 14:07:03 2003 *************** *** 145,151 **** "*cmusaslsecretPLAIN", NULL }; struct propval auxprop_values[3]; ! if (!conn || !userstr) return SASL_BADPARAM; --- 145,155 ---- "*cmusaslsecretPLAIN", NULL }; struct propval auxprop_values[3]; ! ! /* added lopaka */ ! char *salt = malloc(13); ! char *crypt_passwd = NULL; ! if (!conn || !userstr) return SASL_BADPARAM; *************** *** 182,193 **** goto done; } /* At the point this has been called, the username has been canonified * and we've done the auxprop lookup. This should be easy. */ if(auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] ! && !strcmp(auxprop_values[0].values[0], passwd)) { /* We have a plaintext version and it matched! */ return SASL_OK; } else if(auxprop_values[1].name --- 186,211 ---- goto done; } + /* 20030213 lopaka */ + /* encrypt the passwd and then compare it with the encrypted passwd */ + if(strlen(auxprop_values[0].values[0]) > 13) + { + /* MD5 */ + strncpy(salt,auxprop_values[0].values[0],13); + } + else + { + /* DES */ + strncpy(salt,auxprop_values[0].values[0],3); + } + crypt_passwd = crypt(passwd,salt); + /* At the point this has been called, the username has been canonified * and we've done the auxprop lookup. This should be easy. */ if(auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] ! && !strcmp(auxprop_values[0].values[0], crypt_passwd)) { /* We have a plaintext version and it matched! */ return SASL_OK; } else if(auxprop_values[1].name ---------------end patch After applying this patch I get this in the log: Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql auxprop plugin using mysql engine Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin Parse the username aka@lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin try and connect to a host Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin Parse the username aka@lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin try and connect to a host Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin Parse the username aka@lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin try and connect to a host Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:17:34 aka-build postfix/smtpd[15345]: begin transaction Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin create statement from userPassword aka lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin doing query SELECT password FROM mailbox WHERE username = 'aka@lumina.ro'; Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin create statement from cmusaslsecretPLAIN aka lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin doing query SELECT password FROM mailbox WHERE username = 'aka@lumina.ro'; Nov 16 00:17:34 aka-build postfix/smtpd[15345]: commit transaction Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin Parse the username aka@lumina.ro Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin try and connect to a host Nov 16 00:17:34 aka-build postfix/smtpd[15345]: sql plugin trying to open db 'postfix' on host 'localhost' Nov 16 00:17:34 aka-build kernel: smtpd[15345]: segfault at ffffffffac1972e0 rip 00002aaaabdbf8b0 rsp 00007fffffe93678 error 4 The thing that worries me is that segfault :P Does anyone have any suggestions?