I'm setting up a mail server with SMTP authentication and the backend database is MySQL 5.1.53 with pam_mysql and cyrus-sasl2 2.1.23 on Slackware Linux 13.1. When I telnet to test my server-side authenication it gives me the error below:
rootxxxxxx:/etc/postfix# postconf -a
cyrus
dovecot
root@xxxx:/etc/postfix# saslauthd -v
saslauthd 2.1.23
authentication mechanisms: getpwent pam rimap shadow ldap
Error from maillog file
xxxxx postfix/smtpd[1475]: xsasl_cyrus_server_next: decoded response:
xxxxx postfix/smtpd[1475]: warning: SASL authentication failure:
All-whitespace username.
xxxxx postfix/smtpd[1475]: warning: localhost[127.0.0.1]: SASL LOGIN
authentication failed: generic failure
xxxxx postfix/smtpd[1475]: > localhost[127.0.0.1]: 535.5.7.8 Error:
authentication failed: generic failure.
on doing a testsaslauthd :
#testsaslauthd -u mkk@mydomain -p password -f
/var/state/saslauthd/mux -s smtp
0: OK "Success."
When I do a check for server-side SMTP AUTH configuration, I get the output below:
#saslfinger -s
-- content of /usr/lib64/sasl2/smtpd.conf --
#Global Parameters
log_level: 7
allow_plaintext: true
pwcheck_method: auxprop
auxprop_plugin: mysql
mech_list: plain login
sql_engine: mysql
sql_database: postfix
sql_user: --- replaced ---
sql_hostnames:127.0.0.1
sql_passwd: --- replaced ---
sql_select: select password from mailbox where username='%u' AND active ='1'
#sql_select: select password from mailbox where username='%u@%r' AND active ='1'
# --------- saslauthd parameters-------------#
saslauthd_path : /var/state/saslauthd/mux
-- content of /usr/local/lib/sasl2/smtpd.conf --
#Global Parameters
log_level: 7
allow_plaintext: true
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_database: postfix
sql_user: --- replaced ---
sql_hostnames:127.0.0.1
sql_passwd: --- replaced ---
sql_select: select password from mailbox where username='%u' AND active ='1'
#sql_select: select password from mailbox where username='%u@%r' AND active ='1'
# --------- saslauthd parameters-------------#
saslauthd_path : /var/state/saslauthd/mux
-- active services in /etc/postfix/master.cf --
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
smtp inet n - n - - smtpd -v
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp -o smtp_fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
flags=ODRhu user=popmail:popmail argv=/usr/bin/maildrop -w 90 -d ${user}@${nexthop}
${extension} ${recipient} ${user} ${nexthop}
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
-- mechanisms on localhost --
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
-- end of saslfinger output --
Fellow users, how can I fix this? Any advice is highly welcome.