View Full Version : Postfix: smtpd --> SASL LOGIN authentication failed
tom
22nd September 2006, 00:45
I don't now why but I can't login and send emails whith my emailaccout from outsite for example whith an emailclient.
I've done this: http://www.howtoforge.com/perfect_setup_debian_sarge
In /var/log/mail.err I found that:
SASL LOGIN authentication failed
In /var/log/mail.log I found that:
Sep 21 23:52:03 server01 postfix/smtpd[26732]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Sep 21 23:52:03 server01 postfix/smtpd[26732]: warning: SASL authentication failure: Password verification failed
Sep 21 23:52:03 server01 postfix/smtpd[26732]: warning: dslb-088-073-067-12.pools.arcor-ip.net[88.73.67.12]: SASL PLAIN authentication failed
Sep 21 23:52:03 server01 postfix/smtpd[26732]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Sep 21 23:52:03 server01 postfix/smtpd[26732]: warning: dslb-088-073-067-2.pools.arcor-ip.net[88.73.67.12]: SASL LOGIN authentication failed
Sep 21 23:52:05 server01 postfix/smtpd[26732]: lost connection after AUTH from dslb-088-073-067-108.pools.arcor-ip.net[88.73.67.12]
Sep 21 23:52:05 server01 postfix/smtpd[26732]: disconnect from dslb-088-073-067-12.pools.arcor-ip.net[88.73.67.12]
So, I don't know how to fix this authentication problem whith postfix smtpd.
I even only see this output should'nt it show the saslauthd or starts postfix it if nessesary?
server01:~# ps ax|grep sasl
2206 pts/1 R+ 0:00 grep sasl
Are there some postfix-professionals around the world they now what to do?
till
22nd September 2006, 10:41
Do you get an error when you start saslauthd with its start script in /etc/init.d ?
tom
22nd September 2006, 11:15
Do you get an error when you start saslauthd with its start script in /etc/init.d ?
No.
That is find in /var/log/authd.log:
Sep 22 09:39:01 server01 CRON[9849]: (pam_unix) session closed for user root
Sep 22 10:09:01 server01 CRON[10237]: (pam_unix) session opened for user root by (uid=0)
Sep 22 10:09:01 server01 CRON[10237]: (pam_unix) session closed for user root
Sep 22 10:10:12 server01 sshd[10259]: Accepted keyboard-interactive/pam for root from ::ffff:88.73.82.144 port 10565 ssh2
Sep 22 10:10:12 server01 sshd[10264]: (pam_unix) session opened for user root by root(uid=0)
But why I don't see the saslauthd with ps ax after I've started it?
till
22nd September 2006, 12:09
The output from the authd.log comes from your ssh and not sasl daemon. Do you get any errors in the syslog when you start saslauthd?
tom
22nd September 2006, 13:42
The output from the authd.log comes from your ssh and not sasl daemon. Do you get any errors in the syslog when you start saslauthd?
Now, nothing in syslog
But you misunderstood my question:
But why I don't see the saslauthd with ps ax after I've started it?
I mean, should'nt ps ax show the saslauthd in the proceslist after I've started it by running "/etc/init.d/saslauthd"?
till
22nd September 2006, 13:44
I mean, should'nt ps ax show the saslauthd in the proceslist after I've started it by running "/etc/init.d/saslauthd"?
If saslauthd died directly after yo started it, you wont find it in ps -aux, thats why I asked for the syslog.
falko
22nd September 2006, 14:40
What's in /etc/default/saslauthd? Did you also change /etc/init.d/saslauthd, as shown in the tutorial?
tom
22nd September 2006, 15:36
What's in /etc/default/saslauthd? Did you also change /etc/init.d/saslauthd, as shown in the tutorial?
Yeh the solution:)
Yes, I've change it. But I've done a mistake. Your tutorial says to put
START=yes
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
MECHANISMS="pam"
in /etc/init.d/saslauthd
but I've put this ":" bloddy colon on the end of the row...
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r":
Thank a lot for your help. I was searching hours and hours but I could*nt find anything.
Thanks falko.:)
DantePasquale
30th June 2008, 03:06
Hi Til,
Sorry for bugging you guys with dumb questions, but I followed your upgrade tutorial for upgrading Ubuntu to 8.04. Everything works fine, except for the problem identified in this thread. I'm sure it's a typo, but I'm not seeing it. I copied the /etc/default/saslauthd from your tutorial, was I supposed to append that to the one created during the upgrade - or overwrite the one created during upgrade?
Here's my file:
#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"
# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page for general information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
DantePasquale
30th June 2008, 05:37
Not sure what the heck is going on, but I have 2 mux files. Wonder if that's the problem????
root@inferno:/etc/default# ls -l /var/spool/postfix/var/run/saslauthd /var/run/saslauthd/
/var/run/saslauthd/:
total 4
srwxrwxrwx 1 root root 0 2008-06-29 22:23 mux
-rw------- 1 root root 0 2008-06-29 22:23 mux.accept
-rw------- 1 root root 6 2008-06-29 22:23 saslauthd.pid
/var/spool/postfix/var/run/saslauthd:
total 4
srwxrwxrwx 1 root root 0 2008-06-29 19:54 mux
-rw------- 1 root root 0 2008-06-29 19:54 mux.accept
-rw------- 1 root root 6 2008-06-29 19:54 saslauthd.pid
DantePasquale
30th June 2008, 06:07
If I start saslauthd in debug/logging mode from command line things work:
root@inferno:/etc/init.d# saslauthd -a pam -n 5 -V -c -m /var/spool/postfix/var/run/saslauthd -r -d
saslauthd[14011] :main : num_procs : 5
saslauthd[14011] :main : mech_option: NULL
saslauthd[14011] :main : run_path : /var/spool/postfix/var/run/saslauthd
saslauthd[14011] :main : auth_mech : pam
saslauthd[14011] :cache_alloc_mm : mmaped shared memory segment on file: /var/spool/postfix/var/run/saslauthd/cache.mmap
saslauthd[14011] :cache_init : bucket size: 96 bytes
saslauthd[14011] :cache_init : stats size : 36 bytes
saslauthd[14011] :cache_init : timeout : 28800 seconds
saslauthd[14011] :cache_init : cache table: 985828 total bytes
saslauthd[14011] :cache_init : cache table: 1711 slots
saslauthd[14011] :cache_init : cache table: 10266 buckets
saslauthd[14011] :cache_init_lock : flock file opened at /var/spool/postfix/var/run/saslauthd/cache.flock
saslauthd[14011] :ipc_init : using accept lock file: /var/spool/postfix/var/run/saslauthd/mux.accept
saslauthd[14011] :detach_tty : master pid is: 0
saslauthd[14011] :ipc_init : listening on socket: /var/spool/postfix/var/run/saslauthd/mux
saslauthd[14011] :main : using process model
saslauthd[14012] :get_accept_lock : acquired accept lock
saslauthd[14011] :have_baby : forked child: 14012
saslauthd[14011] :have_baby : forked child: 14013
saslauthd[14011] :have_baby : forked child: 14014
saslauthd[14011] :have_baby : forked child: 14015
saslauthd[14012] :rel_accept_lock : released accept lock
saslauthd[14012] :cache_get_rlock : attempting a read lock on slot: 1473
saslauthd[14012] :cache_lookup : [login=web8_xxxxxxxx] [service=] [realm=smtp]: not found, update pending
saslauthd[14012] :cache_un_lock : attempting to release lock on slot: 1473
saslauthd[14013] :get_accept_lock : acquired accept lock
saslauthd[14012] :cache_get_wlock : attempting a write lock on slot: 1473
saslauthd[14012] :cache_commit : lookup committed
saslauthd[14012] :cache_un_lock : attempting to release lock on slot: 1473
saslauthd[14012] :do_auth : auth success: [user=web8_xxxxxxxx] [service=smtp] [realm=] [mech=pam]
saslauthd[14012] :do_request : response: OK
So, what's wrong with /etc/default/saslauthd? or is there another config file for sasl that it's getting it's settings from???
DantePasquale
30th June 2008, 06:30
OK, I found the problem, but don't have a clue on what to do about it. Turns out the /etc/init.d/saslauthd does not look at the OPTIONS parameter from /etc/defaults/saslauthd !!!! Here's the trace ....
++ MECH_OPTIONS=
++ THREADS=5
++ OPTIONS='-c -m /var/spool/postfix/var/run/saslauthd -r'
+ '[' yes '!=' yes ']'
+ '[' xpam = x ']'
+ PARAMS=' -a pam'
+ START='--start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --startas /usr/sbin/saslauthd --name saslauthd -- -a pam'
+ case "${1}" in
+ echo -n 'Starting SASL Authentication Daemon: '
Starting SASL Authentication Daemon: ++ dpkg-statoverride --list /var/run/saslauthd
+ dir='root sasl 710 /var/run/saslauthd'
+ test -z 'root sasl 710 /var/run/saslauthd'
+ createdir root sasl 710 /var/run/saslauthd
+ '[' -d /var/run/saslauthd ']'
+ mkdir -p /var/run/saslauthd
+ chown -c -h root:sasl /var/run/saslauthd
changed ownership of `/var/run/saslauthd' to root:sasl
+ chmod -c 710 /var/run/saslauthd
mode of `/var/run/saslauthd' changed to 0710 (rwx--x---)
+ start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --startas /usr/sbin/saslauthd --name saslauthd -- -a pam
+ echo saslauthd.
saslauthd.
So, anyone know how to fix/get the correct /etc/init.d/saslauthd file????
I'm thinking I have to re-install some package, but don't know which one and what to do after. Any ideas???
falko
1st July 2008, 22:47
What's in your /etc/init.d/saslauthd right now?
DantePasquale
1st July 2008, 23:26
Hi Falko, sorry I forgot to post the /etc/default/saslauthd files contents:
#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"
# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page for general information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
falko
2nd July 2008, 13:39
What's in /etc/init.d/saslauthd?
DantePasquale
2nd July 2008, 16:00
cat /etc/init.d/saslauthd:
#!/bin/sh -e
set -x
NAME=saslauthd
DAEMON="/usr/sbin/${NAME}"
DESC="SASL Authentication Daemon"
DEFAULTS=/etc/default/saslauthd
PWDIR=/var/run/saslauthd
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
[ -d "$4" ] || mkdir -p "$4"
chown -c -h "$1:$2" "$4"
chmod -c "$3" "$4"
}
test -f "${DAEMON}" || exit 0
# Source defaults file; edit that file to configure this script.
if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}"
fi
# If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then
exit 0
fi
# If we have no mechanisms defined
if [ "x${MECHANISMS}" = "x" ]; then
echo "You need to configure ${DEFAULTS} with mechanisms to be used"
exit 0
fi
# Add our mechanimsms with the necessary flag
PARAMS="${PARAMS} -a ${MECHANISMS}"
START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"
# Consider our options
case "${1}" in
start)
echo -n "Starting ${DESC}: "
dir=`dpkg-statoverride --list $PWDIR`
test -z "$dir" || createdir $dir
if start-stop-daemon ${START} >/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(failed)."
exit 1
else
echo "${DAEMON} already running."
exit 0
fi
fi
;;
stop)
echo -n "Stopping ${DESC}: "
if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" \
--startas ${DAEMON} --retry 10 --name ${NAME} \
>/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(not running)."
exit 0
else
echo "(failed)."
exit 1
fi
fi
;;
restart|force-reload)
$0 stop
exec $0 start
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
falko
3rd July 2008, 18:06
# Add our mechanimsms with the necessary flag
PARAMS="${PARAMS} -a ${MECHANISMS}"
Can you replace
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
with
PARAMS="-c -m /var/spool/postfix/var/run/saslauthd -r" in /etc/default/saslauthd?
DantePasquale
21st July 2008, 05:33
Hi Til, no joy, still have the problem. Can you a post an edited version of saslauthd? I may not have followed your instructions in the last post.
falko
22nd July 2008, 15:02
What does your /etc/default/saslauthd look like now?
DantePasquale
22nd July 2008, 17:23
cat /etc/init.d/saslauthd
#!/bin/sh -e
set -x
NAME=saslauthd
DAEMON="/usr/sbin/${NAME}"
DESC="SASL Authentication Daemon"
DEFAULTS=/etc/default/saslauthd
PWDIR=/var/run/saslauthd
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
[ -d "$4" ] || mkdir -p "$4"
chown -c -h "$1:$2" "$4"
chmod -c "$3" "$4"
}
test -f "${DAEMON}" || exit 0
# Source defaults file; edit that file to configure this script.
if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}"
fi
# If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then
exit 0
fi
# If we have no mechanisms defined
if [ "x${MECHANISMS}" = "x" ]; then
echo "You need to configure ${DEFAULTS} with mechanisms to be used"
exit 0
fi
# Add our mechanimsms with the necessary flag
PARAMS="${PARAMS} -a ${MECHANISMS}"
PARAMS="-c -m /var/spool/postfix/var/run/saslauthd -r"
START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"
# Consider our options
case "${1}" in
start)
echo -n "Starting ${DESC}: "
dir=`dpkg-statoverride --list $PWDIR`
test -z "$dir" || createdir $dir
if start-stop-daemon ${START} >/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(failed)."
exit 1
else
echo "${DAEMON} already running."
exit 0
fi
fi
;;
stop)
echo -n "Stopping ${DESC}: "
if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" \
--startas ${DAEMON} --retry 10 --name ${NAME} \
>/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(not running)."
exit 0
else
echo "(failed)."
exit 1
fi
fi
;;
restart|force-reload)
$0 stop
exec $0 start
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
falko
23rd July 2008, 20:01
I'd like to see /etc/default/saslauthd, not /etc/init.d/saslauthd.
DantePasquale
23rd July 2008, 22:09
Sorry about that! Here's /etc/default/saslauthd:
cat /etc/default/saslauthd
#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"
# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page for general information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd -r"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
falko
24th July 2008, 18:52
Have you tried what I suggested in post #17 ( http://www.howtoforge.com/forums/showpost.php?p=134024&postcount=17 )?
DantePasquale
24th July 2008, 21:52
That's what I was confused about...I was looking at the /etc/init.d/saslauthd file and should have been looking at /etc/default/saslauthd :(
I've made the change per post #17 and will test later.
Thanks for your patience ... have a lot on my mind lately.
CrossWind
7th October 2008, 00:28
Have you tried what I suggested in post #17 ( http://www.howtoforge.com/forums/showpost.php?p=134024&postcount=17 )?
Sorry for bumping an old topic,
But this works for me on Ubuntu 8.04!
Maybe update the tutorial?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.