Dovecot - telnet Authentication Failed

Discussion in 'Server Operation' started by muflix, Mar 30, 2012.

  1. muflix

    muflix New Member

    Hello i have a problem with Authentication:

    Dovecot verison: 2.0.18
    Debian 6 squeeze

    # telnet localhost 143
    Code:
    ...
    * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
    IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
    1 login Administrator@mydomain.cz 123456aB
    * OK Waiting for authentication process to respond..
    1 NO [AUTHENTICATIONFAILED] Authentication failed.
    * BYE Disconnected for inactivity.
    Connection closed by foreign host.
    /var/log/dovecot.message
    Code:
    2012-03-30 22:45:03 imap-login: Info: Disconnected: Inactivity (auth
    failed, 1 attempts): user=<Administrator@mydomain.cz>, method=PLAIN,
    rip=127.0.0.1, lip=127.0.0.1, secured
    # 2.0.18: /etc/dovecot/dovecot.conf
    # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.4 ext3
    Code:
    disable_plaintext_auth = no
    log_path = /var/log/dovecot.message
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_location = maildir:/var/mail/%u
    mail_privileged_group = mail
    passdb {
      args = /etc/dovecot/dovecot-ldap.conf
      driver = ldap
    }
    passdb {
      driver = pam
    }
    protocols = imap
    service auth {
      unix_listener auth-master {
        group = vmail
        mode = 0600
        user = vmail
      }
      unix_listener auth-userdb {
        user = vmail
      }
      user = root
    }
    ssl_cert = </etc/ssl/certs/dovecot.pem
    ssl_key = </etc/ssl/private/dovecot.pem
    userdb {
      args = /etc/dovecot/dovecot-ldap.conf
      driver = ldap
    }
    userdb {
      driver = passwd
    }
    protocol lda {
      hostname = oc.test
      log_path = /var/log/dovecot.message
      postmaster_address = postmaster@oc.test
    }
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
    }


    # /etc/dovecot/dovecot-ldap.conf
    Code:
    hosts = 192.168.0.10:389
    dn = cn=Administrator,cn=Users,dc=mydomain,dc=cz
    dnpass = 123456aB
    tls = no
    ldap_version = 3
    base = dc=mydomain,dc=cz
    scope = subtree
    user_attrs = sAMAccountName=home=/var/vmail/mydomain.cz/%$
    user_filter =
    (&(sAMAccountName=%Ln)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
    pass_filter =
    (&(sAMAccountName=%Ln)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

    # cat /etc/hostname
    mailsrv
    # cat /etc/hosts
    127.0.0.1 mydomain.cz mailsrv.mydomain.cz
    ...

    # in /etc/passwd i have:
    mail:x:8:8:mail:/var/mail:/bin/sh
    vmail:x:5000:5000::/var/mail:/bin/sh

    on 192.168.0.10:389 : im using windows Active Directory with default
    settings, user accounts are in Organization Unit named Users (i didnt
    specify mail adresses in AD, hope its not mistake)

    please help, thank you
     
  2. muflix

    muflix New Member

    okay, i changed to cyrus and it works now.. i think maybe was mistake in
    user_attrs = sAMAccountName=home=/var/vmail/mydomain.cz/%$
    or
    (&(sAMAccountName=%Ln)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
    line. thx
     

Share This Page