OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Matthias Kaulartz (quapegmx.net)
Date: Sun Mar 03 2002 - 08:05:16 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Hi all,

    SMTP AUTH with sasldb doesn't want to work. I've been working so hard but no
    I give up. Hope you can help me to solve this problem. I've read all
    articles about that kind of error but wasn't able to find the right
    solution.

    postfix reports "unable to open Berkeley db /etc/sasldb: No such file or
    directory" when trying to do a "AUTH" via SMTP.

    Everything is installed as described in all the SASL or AUTH readme files:
    - postfix-1.1.4 (compiled with USE_SASL_AUTH)
    - cyrus-sasl-1.5.27 (compiled with enable-login).
    - /usr/lib/sasl/smtpd.conf: pwcheck_method: sasldb
    - /etc/sasldb exists! and some test users are created using saslpasswd.
    Permissions are also fine (set to 666 and 777 for testing).

    Postfix configuration:
      alias_database = hash:/etc/aliases
      alias_maps = hash:/etc/aliases
      canonical_maps = hash:/etc/postfix/canonical
      command_directory = /usr/sbin
      config_directory = /etc/postfix
      daemon_directory = /usr/lib/postfix
      debug_peer_level = 2
      default_destination_concurrency_limit = 10
      default_privs = nobody
      local_destination_concurrency_limit = 2
      mail_name = postfix
      mail_owner = postfix
      mail_spool_directory = /var/mail
      mailq_path = /usr/bin/mailq
      manpage_directory = /usr/local/man
      mydestination = $myhostname, localhost.$mydomain
      myhostname = my.domain
      newaliases_path = /usr/bin/newaliases
      program_directory = /usr/lib/postfix
      queue_directory = /var/spool/postfix
      readme_directory = no
      relocated_maps = hash:/etc/postfix/relocated
      sample_directory = /etc/postfix
      sendmail_path = /usr/sbin/sendmail
      setgid_group = postdrop
      smtpd_banner = $myhostname ESMTP $mail_name
      smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated
    reject
      smtpd_sasl_auth_enable = yes
      smtpd_sasl_local_domain = my.domain
      smtpd_sender_restrictions = hash:/etc/postfix/access

    My testing processes:
    - Did a login to port 25. postfix answered:
      250-PIPELINING
      250-SIZE 10240000
      250-VRFY
      250-ETRN
      250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
      250-XVERP
      250 8BITMIME

    - Sent a "AUTH PLAIN dXNlcgB1c2VyAHRlc3Q=" (base64-encoded
    username/pw-string)

    - postfix output in warn.log:
      postfix/smtpd[pid]: unable to open Berkeley db /etc/sasldb: No such file
    or directory
      postfix/smtpd[pid]: warning: host.my.domain[ip]: SASL PLAIN authentication
    failed

    - postfix output to the smtp client:
      535 Error: authentication failed

    - strace monitor result between login and logout:
      select(10, [9], NULL, [9], {290, 920000}) = 1 (in [9], left {286, 520000})
      read(9, "A", 4096) = 1
      time(NULL) = 1015163851
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 700000})
      read(9, "U", 4096) = 1
      time(NULL) = 1015163851
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 570000})
      read(9, "T", 4096) = 1
      time(NULL) = 1015163852
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 890000})
      read(9, "H", 4096) = 1
      time(NULL) = 1015163852
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 370000})
      read(9, " ", 4096) = 1
      time(NULL) = 1015163852
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 680000})
      read(9, "P", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 880000})
      read(9, "L", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 940000})
      read(9, "A", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 860000})
      read(9, "I", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 930000})
      read(9, "N", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {299, 690000})
      read(9, " ", 4096) = 1
      time(NULL) = 1015163853
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {296, 890000})
      read(9, "dX", 4096) = 2
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "Nlc", 4096) = 3
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "g", 4096) = 1
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "B1c2", 4096) = 4
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "VyAH", 4096) = 4
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "Rlc3Q", 4096) = 5
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {300, 0})
      read(9, "=", 4096) = 1
      time(NULL) = 1015163856
      select(10, [9], NULL, [9], {300, 0}) = 1 (in [9], left {298, 850000})
      read(9, "\r\n", 4096) = 2
      open("/etc/sasldb", O_RDONLY) = -1 ENOENT (No such file or
    directory)
      time([1015163858]) = 1015163858
      getpid() = 1920
      rt_sigaction(SIGPIPE, {0x4019e270, [], 0x4000000}, {SIG_IGN}, 8) = 0
      send(7, "<35>Mar 3 14:57:38 postfix/smtp"..., 106, 0) = 106
      rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
      time([1015163858]) = 1015163858
      getpid() = 1920
      rt_sigaction(SIGPIPE, {0x4019e270, [], 0x4000000}, {SIG_IGN}, 8) = 0
      send(7, "<20>Mar 3 14:57:38 postfix/smtp"..., 114, 0) = 114
      rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
      rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
      rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
      rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
      nanosleep({5, 0}, {5, 0}) = 0
      time(NULL) = 1015163863
      time(NULL) = 1015163863
      select(10, NULL, [9], [9], {300, 0}) = 1 (out [9], left {300, 0})
      write(9, "535 Error: authentication failed"..., 34) = 34

    Opening sasldb results in a error? Why? The file is there and permissions
    are alright.

    Best regards
    Matthias Kaulartz

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users