HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   SASL authentication problem (http://www.howtoforge.com/forums/showthread.php?t=12433)

_Alien__ 1st May 2007 01:06

SASL authentication problem
 
I use the tutorial Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft), and i cant send emails error in login, i have enabled smtp authentication in email client

mail.log

Apr 30 21:47:38 teiast postfix/smtpd[4071]: warning: 88.157.58.226: address not listed for hostname rev-88-157-58-226.tvtel.pt
Apr 30 21:47:38 teiast postfix/smtpd[4071]: connect from unknown[88.157.58.226]
Apr 30 21:47:41 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:41 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:41 teiast postfix/smtpd[4071]: warning: SASL authentication failure: no secret in database
Apr 30 21:47:41 teiast postfix/smtpd[4071]: warning: unknown[88.157.58.226]: SASL CRAM-MD5 authentication failed: authentication failure
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: SASL authentication failure: no secret in database
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: unknown[88.157.58.226]: SASL NTLM authentication failed: authentication failure
pr 30 21:47:42 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:42 teiast last message repeated 4 times
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: SASL authentication failure: Password verification failed
Apr 30 21:47:42 teiast postfix/smtpd[4071]: warning: unknown[88.157.58.226]: SASL PLAIN authentication failed: authentication failure
Apr 30 21:47:45 teiast postfix/smtpd[4071]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
Apr 30 21:47:45 teiast last message repeated 5 times
Apr 30 21:47:45 teiast postfix/smtpd[4071]: warning: unknown[88.157.58.226]: SASL LOGIN authentication failed: authentication failure

Even if i take the auth from the client mail to send emails i get error :

mail.log

Apr 30 21:55:29 teiast postfix/smtpd[4101]: warning: 88.157.58.226: address not listed for hostname rev-88-157-58-226.tvtel.pt
Apr 30 21:55:29 teiast postfix/smtpd[4101]: connect from unknown[88.157.58.226]
Apr 30 21:55:58 teiast postfix/smtpd[4101]: warning: 226.58.157.88.relays.ordb.org: RBL lookup error: Host or domain name not found. Name service error for name=226.58.157.88.relays.ordb.org type=A: Host not found, try again
Apr 30 21:55:58 teiast postfix/smtpd[4101]: NOQUEUE: reject: RCPT from unknown[88.157.58.226]: 554 5.7.1 <seiya.pt@gmail.com>: Relay access denied; from=<seiya.pt@gmail.com> to=<seiya.pt@gmail.com> proto=ESMTP helo=<[192.168.2.169]>


auth.log

Apr 30 22:23:47 teiast postfix/smtpd[4071]: sql_select option missing
Apr 30 22:23:47 teiast postfix/smtpd[4071]: auxpropfunc error no mechanism available
Apr 30 22:23:47 teiast postfix/smtpd[4071]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Apr 30 22:23:47 teiast postfix/smtpd[4071]: OTP unavailable because can't read/write key database /etc/opiekeys: No such file or directory
Apr 30 22:23:50 teiast postfix/smtpd[4071]: NTLM server step 1
Apr 30 22:23:50 teiast postfix/smtpd[4071]: client flags: ffff8207
Apr 30 22:23:50 teiast postfix/smtpd[4071]: NTLM server step 2
Apr 30 22:23:50 teiast postfix/smtpd[4071]: client user: hugomartins@teiast.com



root@teiast:~# locate smtpd.conf /etc/postfix/sasl/smtpd.conf
root@teiast:~#


smtpf.conf

pwcheck_method: saslauthd

mech_list: plain login

But in telnet localhost 25 i have

ehlo localhost
250-teiast.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-AUTH NTLM LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250-AUTH=NTLM LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

_Alien__ 1st May 2007 02:33

I have fix the problem in AUTH change lines in main.conf, but i have the same problem cant send emails because of SASL authentication

From:
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2

To:
smtpd_sasl_path = smtpd


220 teiast.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-teiast.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN


mail.log

May 1 01:29:54 teiast postfix/smtpd[3855]: warning: 88.157.58.226: address not listed for hostname rev-88-157-58-226.tvtel.pt
May 1 01:29:54 teiast postfix/smtpd[3855]: connect from unknown[88.157.58.226]
May 1 01:29:54 teiast postfix/smtpd[3855]: setting up TLS connection from unknown[88.157.58.226]
May 1 01:29:55 teiast postfix/smtpd[3855]: TLS connection established from unknown[88.157.58.226]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
May 1 01:29:56 teiast postfix/smtpd[3855]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 1 01:29:56 teiast postfix/smtpd[3855]: warning: SASL authentication failure: Password verification failed
May 1 01:29:56 teiast postfix/smtpd[3855]: warning: unknown[88.157.58.226]: SASL PLAIN authentication failed: generic failure
May 1 01:29:57 teiast postfix/smtpd[3855]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 1 01:29:57 teiast postfix/smtpd[3855]: warning: unknown[88.157.58.226]: SASL LOGIN authentication failed: generic failure
May 1 01:30:00 teiast postfix/smtpd[3855]: lost connection after AUTH from unknown[88.157.58.226]
May 1 01:30:00 teiast postfix/smtpd[3855]: disconnect from unknown[88.157.58.226]

_Alien__ 1st May 2007 14:40

I have try from Thunderbird and Outlook to send emails, in Outlook i active the SSL, in Thunderbird i put TLS if need, since whit SSL in Thunderbird he just keep trying to connect, here are the erros:

Outlook
Code:

May  1 13:24:55 teiast postfix/smtpd[3885]: connect from unknown[85.138.82.2]
May  1 13:24:55 teiast postfix/smtpd[3885]: setting up TLS connection from unknown[85.138.82.2]
May  1 13:24:55 teiast postfix/smtpd[3885]: TLS connection established from unknown[85.138.82.2]: TLSv1 with cipher RC4-MD5 (128/128 bits)
May  1 13:24:55 teiast postfix/smtpd[3885]: warning: unknown[85.138.82.2]: SASL LOGIN authentication failed: authentication failure
May  1 13:24:55 teiast postfix/smtpd[3885]: lost connection after AUTH from unknown[85.138.82.2]
May  1 13:24:55 teiast postfix/smtpd[3885]: disconnect from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: connect from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: setting up TLS connection from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: TLS connection established from unknown[85.138.82.2]: TLSv1 with cipher RC4-MD5 (128/128 bits)
May  1 13:24:59 teiast postfix/smtpd[3885]: warning: unknown[85.138.82.2]: SASL LOGIN authentication failed: authentication failure
May  1 13:24:59 teiast postfix/smtpd[3885]: lost connection after AUTH from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: disconnect from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: lost connection after AUTH from unknown[85.138.82.2]
May  1 13:24:59 teiast postfix/smtpd[3885]: disconnect from unknown[85.138.82.2]

Thunderbird
Code:

May  1 13:25:52 teiast postfix/smtpd[3885]: connect from unknown[88.157.58.226]
May  1 13:26:17 teiast postfix/smtpd[3885]: lost connection after UNKNOWN from unknown[88.157.58.226]
May  1 13:26:17 teiast postfix/smtpd[3885]: disconnect from unknown[88.157.58.226]
May  1 13:26:25 teiast postfix/smtpd[3885]: warning: 88.157.58.226: address not listed for hostname rev-88-157-58-226.tvtel.pt
May  1 13:26:25 teiast postfix/smtpd[3885]: connect from unknown[88.157.58.226]
May  1 13:26:25 teiast postfix/smtpd[3885]: setting up TLS connection from unknown[88.157.58.226]
May  1 13:26:27 teiast postfix/smtpd[3885]: TLS connection established from unknown[88.157.58.226]: SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)
May  1 13:26:30 teiast postfix/smtpd[3885]: warning: SASL authentication failure: Password verification failed
May  1 13:26:30 teiast postfix/smtpd[3885]: warning: unknown[88.157.58.226]: SASL PLAIN authentication failed: authentication failure
May  1 13:26:30 teiast postfix/smtpd[3885]: warning: unknown[88.157.58.226]: SASL LOGIN authentication failed: authentication failure
May  1 13:26:32 teiast postfix/smtpd[3885]: lost connection after AUTH from unknown[88.157.58.226]
May  1 13:26:32 teiast postfix/smtpd[3885]: disconnect from unknown[88.157.58.226]

Outlook whitout SSL
Code:

May  1 13:29:00 teiast postfix/smtpd[3895]: connect from unknown[85.138.82.2]
May  1 13:29:00 teiast postfix/smtpd[3895]: warning: unknown[85.138.82.2]: SASL LOGIN authentication failed: authentication failure
May  1 13:29:00 teiast postfix/smtpd[3895]: lost connection after AUTH from unknown[85.138.82.2]
May  1 13:29:00 teiast postfix/smtpd[3895]: disconnect from unknown[85.138.82.2]
May  1 13:29:02 teiast postfix/smtpd[3895]: connect from unknown[85.138.82.2]
May  1 13:29:02 teiast postfix/smtpd[3895]: warning: unknown[85.138.82.2]: SASL LOGIN authentication failed: authentication failure
May  1 13:29:02 teiast postfix/smtpd[3895]: lost connection after AUTH from unknown[85.138.82.2]
May  1 13:29:02 teiast postfix/smtpd[3895]: disconnect from unknown[85.138.82.2]

Thunderbird whit SSL and Open port 465 on router
Code:

May  1 13:38:59 teiast postfix/smtpd[3910]: warning: 88.157.58.226: address not listed for hostname rev-88-157-58-226.tvtel.pt
May  1 13:38:59 teiast postfix/smtpd[3910]: connect from unknown[88.157.58.226]
May  1 13:38:59 teiast postfix/smtpd[3910]: setting up TLS connection from unknown[88.157.58.226]
May  1 13:38:59 teiast postfix/smtpd[3910]: TLS connection established from unknown[88.157.58.226]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
May  1 13:39:07 teiast postfix/smtpd[3910]: warning: SASL authentication failure: Password verification failed
May  1 13:39:07 teiast postfix/smtpd[3910]: warning: unknown[88.157.58.226]: SASL PLAIN authentication failed: authentication failure
May  1 13:39:07 teiast postfix/smtpd[3910]: warning: unknown[88.157.58.226]: SASL LOGIN authentication failed: authentication failure
May  1 13:39:09 teiast postfix/smtpd[3910]: warning: SASL authentication failure: Password verification failed
May  1 13:39:09 teiast postfix/smtpd[3910]: warning: unknown[88.157.58.226]: SASL PLAIN authentication failed: authentication failure
May  1 13:39:11 teiast postfix/smtpd[3910]: warning: unknown[88.157.58.226]: SASL LOGIN authentication failed: authentication failure
May  1 13:39:14 teiast postfix/smtpd[3910]: lost connection after AUTH from unknown[88.157.58.226]
May  1 13:39:14 teiast postfix/smtpd[3910]: disconnect from unknown[88.157.58.226]

mysql.log

Code:

070501 14:46:00      8 Connect    webmail@localhost on mail
                      8 Init DB    mail
                      8 Query      SELECT password FROM users WHERE email = 'hugomartins@teiast.com'
                      8 Quit
                      9 Connect    Access denied for user 'webmaill'@'localhost' (using password: YES)

auth.log
Code:

May  1 14:46:00 teiast saslauthd[3720]: pam_mysql - MySQL error (Access denied for user 'webmaill'@'localhost' (using password: YES))
May  1 14:46:00 teiast saslauthd[3720]: DEBUG: auth_pam: pam_acct_mgmt failed: Permission denied
May  1 14:46:00 teiast saslauthd[3720]: do_auth        : auth failure: [user=hugomartins@teiast.com] [service=smtp] [realm=teiast.com] [mech=pam] [reason=PAM acct error]


falko 1st May 2007 21:00

Please compare /etc/pam.d/smtp and /etc/postfix/sasl/smtpd.conf with the versions in the tutorial.

_Alien__ 1st May 2007 21:50

After so many changes mysql its not working now :), going to reinstall Ubuntu 6.10 and try the tutorial Perfect Setup, then i will report if everything works fine.

Enrikoala 30th May 2009 17:58

Same problem
 
Hi, I've just installed twice today in different computer the howto http://www.howtoforge.com/virtual-us...ail-ubuntu8.10 (fantastic!) and all works fine.. all except SMTP auth.

This is my mail.warn
Quote:

May 30 17:47:04 otticaluciano postfix/smtpd[6232]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
May 30 17:47:04 otticaluciano postfix/smtpd[6232]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Permission denied
May 30 17:47:04 otticaluciano postfix/smtpd[6232]: warning: 93-32-236-27.ip35.fastwebnet.it[93.32.236.27]: SASL LOGIN authentication failed: authentication failure
I've followed the howto really step by step and I've replicated the same configuration an another pc and I've the same result.

Anyone could help me?

Thanks,

Enriko

falko 31st May 2009 14:19

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

Enrikoala 1st June 2009 19:23

/etc/default/saslaut:

Quote:

START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
/etc/postfix/sasl/smtpd.conf:

Quote:

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: xxxxxxx (removed for obvious reasons but certainly correct!)
sql_passwd: xxxxxxxx (removed for obvious reasons but certainly correct!)
sql_database: postfix
sql_select: select password from users where email = '%u'

falko 2nd June 2009 19:22

Can you restart saslauthd and Postfix? If that doesn't help - what's in /etc/postfix/master.cf?

Enrikoala 2nd June 2009 20:45

First of all thanks for interesting.
Daemons restarted, problems remain and here you'll find /etc/postfix/master.cf:

Quote:

#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache

amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_chec ks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}



All times are GMT +2. The time now is 18:16.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.