PDA

View Full Version : Sujet : warning: SASL authentication failure: cannot connect to saslauthd


marveljojo
27th October 2008, 20:05
Hello there,
I try to setup an smtp relay with sasl authentication (but without sql).
It's over an ubuntu 8.04 server edition.

Here is my error =
SASL authentication failure: cannot connect to saslauthd server: No such file or directory
For informations:
- testsaslauthd tell me "0: OK "Success"" and "0: No "authentication failed" if I mispelled my username or my pwd. So here everything seems to be fine.
- Next, here is what I did on the main.cf :
mynetworks = 127.0.0.0/8 [:ffff:127.0.0.0]/104 [:1]/128,8x.1xx.xxx.119 --> my private IP, where I do all of my tests.
- Using telnet, from 8x.1xx.xxx.119 , and by doing "telnet smtp.MonDomaine.com 25", everything fine, and my mail.log :
Oct 26 18:35:03 stock postfix/smtp[2911]: 5014910052: to=<test@MonDomaine.com>, relay=provmx1.mail.blablabla.com[1xx.7x.2x.1x]:25, delay=112, delays=111/0.01/0.65/0.08, dsn=2.0.0, status=sent (250 Ok: queued as 6068A3FE57)
Oct 26 18:35:03 stock postfix/qmgr[32533]: 5014910052: removed
and the mail is going right to m mail box ..

But, as soon as I do a real test (but from my autorized IP), I get the following :
SASL authentication failure: cannot connect to saslauthd server: No such file or directory

The main target is to allowed employees to send email from all around the world, without to deal with the local smtp.
Can someone help me ?

thanks !!!

MJ :)

marveljojo
27th October 2008, 20:07
More informations :

# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - y - - smtpd

and here what I just did :

mkdir -p /var/spool/postfix/var/run/courier/authdaemon

adding in /etc/fstab :
/var/run/courier/authdaemon /var/spool/postfix/var/run/courier/authdaemon none bind 0 0

Then :
mount /var/spool/postfix/var/run/courier/authdaemon

And my new error message :
tail -f mail.log

Oct 27 18:52:10 stock postfix/smtpd[15556]: connect from car06-5-8x-1xx-xx3-xx9.fbx.proxad.net[8x-1xx-xx3-xx9]
Oct 27 18:52:10 stock postfix/smtpd[15556]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Oct 27 18:52:10 stock postfix/smtpd[15556]: warning: car06-5-8x-1xx-xx3-xx9.fbx.proxad.net[8x-1xx-xx3-xx9]: SASL LOGIN authentication failed: generic failure
Oct 27 18:52:10 stock postfix/smtpd[15556]: lost connection after AUTH from car06-5-8x-1xx-xx3-xx9.fbx.proxad.net[8x-1xx-xx3-xx9]
Oct 27 18:52:10 stock postfix/smtpd[15556]: disconnect from car06-5-8x-1xx-xx3-xx9.fbx.proxad.net[8x-1xx-xx3-xx9]

falko
28th October 2008, 16:22
Can you try this?

adduser postfix sasl
/etc/init.d/postfix restart
/etc/init.d/saslauthd start

marveljojo
28th October 2008, 23:37
always the same error.
Some more informations :

root@nsxxxxxx:~# ps aux|grep postfix
root 17956 0.0 0.1 36672 2144 ? Ss 16:39 0:00 /usr/lib/postfix/master
postfix 17959 0.0 0.1 38728 2144 ? S 16:39 0:00 pickup -l -t fifo -u -c
postfix 17961 0.0 0.1 38772 2232 ? S 16:39 0:00 qmgr -l -t fifo -u
postfix 17962 0.0 0.1 38812 2220 ? S 16:39 0:00 cleanup -z -t unix -u -c
postfix 17967 0.0 0.1 43108 2732 ? S 16:39 0:00 smtp -t unix -u -c
postfix 17968 0.0 0.1 41236 2988 ? S 16:39 0:00 tlsmgr -l -t unix -u -c
postfix 17969 0.0 0.1 38756 2196 ? S 16:39 0:00 bounce -z -t unix -u -c
postfix 17970 0.0 0.1 38756 2164 ? S 16:39 0:00 bounce -z -t unix -u -c
root 18024 0.0 0.0 3936 672 pts/0 S+ 16:39 0:00 grep postfix

root@nsxxxxxx:/var/log# ls -la /var/spool/postfix/var/run/courier/authdaemon
total 8
drwxr-x--- 2 daemon daemon 100 Oct 16 16:42 .
drwxr-xr-x 3 root root 4096 Oct 27 18:48 ..
-rw-r--r-- 1 root root 5 Oct 16 16:42 pid
-rw------- 1 root root 0 Oct 16 16:42 pid.lock
srwxrwxrwx 1 root root 0 Oct 16 16:42 socket

I'm really lost !!!!!! :(:(:(:(

falko
29th October 2008, 14:00
What's in /etc/default/saslauthd?

marveljojo
29th October 2008, 19:15
It seems that postif doesn't know how to contac sasl deamon !?!
--------------------------
# 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

PARAMS="-m /var/spool/postfix/var/run/saslauthd"
# PARAMS="-O /etc/saslauthd.conf"

# 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="sasldb"

# 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"

falko
30th October 2008, 16:21
Can you try this instead?

#
# 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"

What's in /etc/postfix/sasl/smtpd.conf?

marveljojo
30th October 2008, 21:09
Hello falko.
thanks again :)
So here is what is on my
/etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login
saslauthd_path: /var/run/saslauthd/mux

Now I did what you told me, and I restart sasllauthd :
I do a tail -f mail.log:


Oct 30 20:07:03 stock postfix/smtpd[2134]: connect from car06-5-88-xxx-183-xxx.fbx.proxad.net[88.xxx.183.xxx]
Oct 30 20:07:05 stock postfix/smtpd[2134]: warning: car06-5-88-xxx-183-xxx.fbx.proxad.net[88.xxx.183.xxx]: SASL LOGIN authentication failed: authentication failure
Oct 30 20:07:05 stock postfix/smtpd[2134]: lost connection after AUTH from car06-5-88-xxx-183-xxx.fbx.proxad.net[88.xxx.183.xxx]
Oct 30 20:07:05 stock postfix/smtpd[2134]: disconnect from car06-5-88-xxx-183-xxx.fbx.proxad.net[88.xxx.183.xxx]

So now I have a SASL LOGIN authentication failed: authentication failure, which is different :)

any idea ?
I can't see why both of them (postfix and sasl) cannot communicate together ....

marveljojo
30th October 2008, 21:22
In fact, what is the difference between your config and mine ?
For me, the main difference is MECHANISMS="pam"
Can you tell me how to setup users using PAM ?
and , which command can I use to test it ?

Greetings :)
MJ