Hello misc,

I installed cyrus-sasl-2.1.22p1-mysql from packages and trying make it
working, but during testsaslauthd queries I not get any results :(.
I enabled log queries in mysql but there is no connection attempts
from saslauthd to needed table (no connection, no auth, nothing).


As described in documentation I created smtpd.conf and pit it to
needed dir.

# cat /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: PLAIN LOGIN
sql_user: postfix
sql_passwd: postfix
sql_hostnames: localhost
sql_database: postfix
sql_statement: SELECT password FROM mailbox WHERE username = '%u'
sql_verbose: yes
 
# saslauthd -d -a getpwent
saslauthd[19646] :main            : num_procs  : 5
saslauthd[19646] :main            : mech_option: NULL
saslauthd[19646] :main            : run_path   : /var/sasl2
saslauthd[19646] :main            : auth_mech  : getpwent
saslauthd[19646] :ipc_init        : using accept lock file: 
/var/sasl2/mux.accept
saslauthd[19646] :detach_tty      : master pid is: 0
saslauthd[19646] :ipc_init        : listening on socket: /var/sasl2/mux
saslauthd[19646] :main            : using process model
saslauthd[19646] :have_baby       : forked child: 8299
saslauthd[8299] :get_accept_lock : acquired accept lock
saslauthd[19646] :have_baby       : forked child: 14091
saslauthd[19646] :have_baby       : forked child: 21287
saslauthd[19646] :have_baby       : forked child: 12263
 
# testsaslauthd -s smtpd -u eject -p mypassword
0: NO "authentication failed"
# testsaslauthd -u eject -p mypassword
0: NO "authentication failed"


 
===================================================
In saslauthd debug output after query
1.
saslauthd[14091] :get_accept_lock : acquired accept lock
saslauthd[8299] :rel_accept_lock : released accept lock
saslauthd[8299] :do_auth         : auth failure: [user=eject] [service=smtpd] 
[realm=] [mech=getpwent] [reason=Unknown]
saslauthd[8299] :do_request      : response: NO
saslauthd[8299] :do_auth         : auth failure: [user=eject][service=imapd] 
[realm=] [mech=getpwent] [reason=Unknown]
saslauthd[8299] :do_request      : response: NO
 
 
# tail -f /var/mysql/query.log

nothing related to my queries

After this I run saslauthd with ktrace to see what files it read when
it runs. During running ktrace I run some queries.

# ktrace saslauthd -d -a getpwent
saslauthd[7962] :main            : num_procs  : 5
saslauthd[7962] :main            : mech_option: NULL
saslauthd[7962] :main            : run_path   : /var/sasl2
saslauthd[7962] :main            : auth_mech  : getpwent
saslauthd[7962] :ipc_init        : using accept lock file: /var/sasl2/mux.accept
saslauthd[7962] :detach_tty      : master pid is: 0
saslauthd[7962] :ipc_init        : listening on socket: /var/sasl2/mux
saslauthd[7962] :main            : using process model
saslauthd[7962] :have_baby       : forked child: 23867
saslauthd[23867] :get_accept_lock : acquired accept lock
saslauthd[7962] :have_baby       : forked child: 16377
saslauthd[7962] :have_baby       : forked child: 24519
saslauthd[7962] :have_baby       : forked child: 28716

I discovered (see below) that saslauthd not looking for smtpd.conf during it :(
why?

# kdump | grep NAMI
  7962 ktrace   NAMI  "/sbin/saslauthd"
  7962 ktrace   NAMI  "/usr/sbin/saslauthd"
  7962 ktrace   NAMI  "/bin/saslauthd"
  7962 ktrace   NAMI  "/usr/bin/saslauthd"
  7962 ktrace   NAMI  "/usr/X11R6/bin/saslauthd"
  7962 ktrace   NAMI  "/usr/local/sbin/saslauthd"
  7962 saslauthd NAMI  "/usr/libexec/ld.so"
  7962 saslauthd NAMI  "/var/run/ld.so.hints"
  7962 saslauthd NAMI  "/usr/lib/libcrypto.so.13.0"
  7962 saslauthd NAMI  "/usr/lib/libc.so.41.0"
  7962 saslauthd NAMI  "/usr/lib/libcom_err.so.16.0"
  7962 saslauthd NAMI  "/usr/lib/libkrb5.so.16.0"
  7962 saslauthd NAMI  "/usr/lib/libasn1.so.16.0"
  7962 saslauthd NAMI  "/usr/lib/libgssapi.so.5.0"
  7962 saslauthd NAMI  "/etc/malloc.conf"
  7962 saslauthd NAMI  "/dev/log"
  7962 saslauthd NAMI  "/etc/localtime"
  7962 saslauthd NAMI  "/etc/localtime"
  7962 saslauthd NAMI  "/var/sasl2"
  7962 saslauthd NAMI  "/var/sasl2/saslauthd.pid.lock"
  7962 saslauthd NAMI  "/var/sasl2/mux.accept"
  7962 saslauthd NAMI  "/var/sasl2/mux"
  7962 saslauthd NAMI  "/var/sasl2/mux"
  7962 saslauthd NAMI  "/var/sasl2/mux"
  7962 saslauthd NAMI  "/var/sasl2/saslauthd.pid.lock"
  7962 saslauthd NAMI  "/var/sasl2/mux.accept"
  7962 saslauthd NAMI  "/var/sasl2/mux"

I will be sincerely thankful if  anybody advice what's wrong in my
case.

-- 
Best regards,
 Evgeniy                          mailto:[EMAIL PROTECTED]

Reply via email to