SASL authentication problem

Discussion in 'HOWTO-Related Questions' started by _Alien__, May 1, 2007.

  1. _Alien__

    _Alien__ New Member

    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 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> 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: [email protected]



    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
     
    Last edited: May 1, 2007
  2. _Alien__

    _Alien__ New Member

    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]
     
    Last edited: May 1, 2007
  3. _Alien__

    _Alien__ New Member

    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 = '[email protected]'
                          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: [[email protected]] [service=smtp] [realm=teiast.com] [mech=pam] [reason=PAM acct error]
    
     
    Last edited: May 1, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

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

    _Alien__ New Member

    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.
     
  6. Enrikoala

    Enrikoala New Member

    Same problem

    Hi, I've just installed twice today in different computer the howto http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.10 (fantastic!) and all works fine.. all except SMTP auth.

    This is my mail.warn
    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
     
  7. falko

    falko Super Moderator Howtoforge Staff

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

    Enrikoala New Member

    /etc/default/saslaut:

    /etc/postfix/sasl/smtpd.conf:

     
  9. falko

    falko Super Moderator Howtoforge Staff

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

    Enrikoala New Member

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

     
  11. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. What's the output of
    Code:
    updatedb
    locate smtpd.conf
    ?
     
  12. Enrikoala

    Enrikoala New Member

    Nothing about the first and /etc/postfix/sasl/smtpd.conf about the second:

     
  13. Enrikoala

    Enrikoala New Member

    Could the problem be that I've had a lot of problems configuring bind9?
     
  14. Enrikoala

    Enrikoala New Member

    ...and if it'd be useful the mail that cron send me every night (as I've set up) is completely empty of users in both computer where I've installed this service following the howto. This's the last arrived me:

     
  15. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. I have no idea why saslauthd is looking for sasldb2... :confused:
     
  16. zeljko

    zeljko New Member

    Have you solved this? I am having the same problem and no one can help me fix this :(
     
  17. esal

    esal New Member

  18. esal

    esal New Member

    actually I had typo and now I have working system :) with newest versions installed from crash this week with that great howto. din't do everything with copy-paste and had to double check everything several times :confused:
     

Share This Page