Problems Dovecot / ISPConfig3 , user not found

Discussion in 'General' started by fransyozef, Nov 24, 2014.

  1. fransyozef

    fransyozef New Member

    Hi

    I have some problems with Dovecot.

    When I add a mailbox in ISPConfig3 and try to login with webmail, it keeps saying username/password not correct .. but I double checked the username and password.

    So I decided to do some loggin. So I found

    Nov 24 20:12:39 auth-worker: Info: pam(<MY EMAIL>,127.0.0.1): unknown user

    So I tried to lookup the username with doveadm ... and turns out ... the user doesn't exists ...

    I have no idea what to look for. Can anybody help me?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The user is the full email address, not just the part in front of the @.
     
  3. fransyozef

    fransyozef New Member

    Yes I do know that one :)

    Is there somewhere Dovecot need to lookup for example mysql?

    And if so, where can I check?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Dovecot connects directly to mysql. which of the perfect server tutorials did you use to prepare your server for the ispconfig installation?
     
  5. fransyozef

    fransyozef New Member

    Yeah problem is

    This error just occured and I don't know wich one I used.

    also .. I had to remove dovecot, install courier, back to dovecot

    Running dovecot 2.0.19

    Also ... I noticed this after some digging

    passdb {
    driver = passwd-file
    args = scheme=CRYPT username_format=%u /etc/dovecot/users
    }

    userdb {
    driver = passwd-file
    args = username_format=%u /etc/dovecot/users
    }

    so does this means it doesn't connect to mysql? but tryin to lookup in a passwordfile?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This measn that you have overwritten the dovecot config by your reinstall.download ispconfig again, unpack it, run the update.php script in the install folder and let the updater reconfigure the services.
     
  7. fransyozef

    fransyozef New Member

    thnx I will try that
     
  8. fransyozef

    fransyozef New Member

    hmm okey

    so just did the update ... and indeed ispconfig rewrote the dovecot configs

    But now, I have a connection refused .. for example when I try to telnet localhost imap
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you missed to install the dovecot mysql package. check again the mail install sectin of the perfect server tutorial and rerun the install commands to ensure that all packages are installed.
     
  10. fransyozef

    fransyozef New Member

    I'm using : http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3-p4

    Distributor ID: Ubuntu
    Description: Ubuntu 12.04.5 LTS
    Release: 12.04
    Codename: precise



    # apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    dovecot-imapd is already the newest version.
    dovecot-pop3d is already the newest version.
    dovecot-sieve is already the newest version.
    dovecot-mysql is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

    so all my dovecot packages are already newest.

    My docvecot.conf:


    listen = *, ::
    protocols = imap pop3
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    postmaster_address = postmaster@mydomain.nl
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    log_path = /var/log/dovecot.log
    passdb {
    args = /etc/dovecot/dovecot-sql.conf
    driver = sql
    }
    userdb {
    args = /etc/dovecot/dovecot-sql.conf
    driver = sql
    }
    plugin {
    quota = dict:user::file:/var/vmail/%d/%n/.quotausage
    sieve=/var/vmail/%d/%n/.sieve
    }
    service auth {
    unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
    }
    unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
    }
    user = root
    }
    service imap-login {
    client_limit = 1000
    process_limit = 500
    }
    protocol imap {
    mail_plugins = quota imap_quota
    }
    protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
    mail_plugins = quota
    }
    protocol lda {
    mail_plugins = sieve quota
    }
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The dovecot.conf is correct. which exact error do you get in the mail.log file?
     
  12. fransyozef

    fransyozef New Member

    also what's puzzling me:

    #/etc/init.d/dovecot stop
    #/etc/init.d/dovecot start
    dovecot start/running, process 3109

    #ps auxw|grep "dovecot"
    root 3162 0.0 0.0 8076 656 pts/0 S+ 10:19 0:00 grep --color=auto dovecot

    #cat /var/log/dovecot.log


    A tail from the mail.log
    Nov 25 10:20:02 myservername postfix/smtpd[3206]: warning: TLS library problem: 3206:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
    Nov 25 10:20:02 myservername postfix/smtpd[3206]: warning: TLS library problem: 3206:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
    Nov 25 10:20:02 myservername postfix/smtpd[3206]: connect from localhost[127.0.0.1]
    Nov 25 10:20:02 myservername postfix/smtpd[3206]: warning: SASL: Connect to private/auth failed: Connection refused
    Nov 25 10:20:02 myservername postfix/smtpd[3206]: fatal: no SASL authentication mechanisms
    Nov 25 10:20:03 myservername postfix/master[2023]: warning: process /usr/lib/postfix/smtpd pid 3206 exit status 1
    Nov 25 10:20:03 myservername postfix/master[2023]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling


    #telnet localhost imap
    Trying 127.0.0.1...
    telnet: Unable to connect to remote host: Connection refused



    seems it's still not running? And can't find a reason why dovecot is not running
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you deleted some ssl certs that are used by postfix and dovecot and now the services dont start as they cant load the missing ssl cert files.
     
  14. fransyozef

    fransyozef New Member

    Ah finally an error:

    /etc/init.d# dovecot
    doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 8: ssl_cert: Can't open file /etc/postfix/smtpd.cert: No such file or directory

    so now I will try and find why I don't have smtpd.cert
     
  15. fransyozef

    fransyozef New Member

    Ah so I'm guessing it's

    http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3-p7

    Generating a 2048 bit RSA private key
    ...........+++
    .....................+++
    writing new private key to 'smtpd.key'
    -----
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.



    that part :)

    does ispconfig have a script to regenerate them?
     
  16. fransyozef

    fransyozef New Member

    also ... if reinstall ispconfig (running de install.php) ... will ispconfig remove all my databases/websites?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    No, they are just generated once during install. if you deleted them, then you will have to recreate them with openssl manually.

    No. But this will irreversibly destroy your setup as you would ahve to manually remove all websites and databases before you can ispconfig again.
     
  18. fransyozef

    fransyozef New Member

    YESSSSS it works!!! thnx

    I went throught the install.php and found the part of the cert making and found

    openssl req -new -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509

    I put the output files in /etc/postfix

    restarted postfix and started dovecot

    and now it works....

    Thanks everyone for the help!
     

Share This Page