Ubuntu: Dovecot & etc/passwd file encoding problem



Question:

I have dovecot on my 16.04 machine with the configuration as shown below. When I want to use special characters in my passwords I am getting authentication errors.

I am pretty sure this is related to the fact that I have a mixture of German and English locale on my machine (I want English UI and everything but also be able to use German specifics like currency).

When I try to authenticate to dovecot via doveadm auth test user on commandline it works.

Only if I try to connect via Thunderbird or Webmail I am getting authentication errors in /var/log/auth "auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=user rhost= user=user"

I enable verbose output in log files and I can see that there is a clear problem with the encoding (the password was "öä###":

dovecot: auth-worker(44848): Debug: pam(xxx): lookup service=dovecot  dovecot: auth-worker(44848): Debug: pam(xxx): #1/1 style=1 msg=Password:  dovecot: auth-worker(44848): pam(xxx): pam_authenticate() failed: Authentication failure (password mismatch?) (given password: ��###)  dovecot: auth: Debug: client passdb out: FAIL#0112#011user=xxx  dovecot: imap-login: Disconnected (auth failed, 2 attempts in 14 secs): user=<xxx>, method=PLAIN, rip=xxx, lip=xxx, TLS, session=<xxx>  

What can I do to fix this?

doveconf -n

# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf  # Pigeonhole version 0.4.13 (7b14904)  # OS: Linux 4.4.0-96-generic x86_64 Ubuntu 16.04.3 LTS   mail_location = maildir:~/Maildir  managesieve_notify_capability = mailto  managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext  namespace inbox {    inbox = yes    location =     mailbox Drafts {      special_use = \Drafts    }    mailbox Junk {      special_use = \Junk    }    mailbox Sent {      special_use = \Sent    }    mailbox "Sent Messages" {      special_use = \Sent    }    mailbox Trash {      special_use = \Trash    }    prefix =   }  passdb {    driver = pam  }  plugin {    sieve = file:~/sieve;active=~/.dovecot.sieve  }  protocols = " imap sieve"  service imap-login {    inet_listener imap {      port = 0    }  }  service pop3-login {    inet_listener pop3 {      port = 0    }    inet_listener pop3s {      port = 0    }  }  ssl_cert = </etc/letsencrypt/live/xxx/fullchain.pem  ssl_key = </etc/letsencrypt/live/xxx/privkey.pem  userdb {    driver = passwd  }  

locale

LANG=en_GB.UTF-8  LANGUAGE=en_GB:en_AU:en_CA:en  LC_CTYPE="en_GB.UTF-8"  LC_NUMERIC=de_AT.UTF-8  LC_TIME=de_AT.UTF-8  LC_COLLATE="en_GB.UTF-8"  LC_MONETARY=de_AT.UTF-8  LC_MESSAGES="en_GB.UTF-8"  LC_PAPER=de_AT.UTF-8  LC_NAME=de_AT.UTF-8  LC_ADDRESS=de_AT.UTF-8  LC_TELEPHONE=de_AT.UTF-8  LC_MEASUREMENT=de_AT.UTF-8  LC_IDENTIFICATION=de_AT.UTF-8  LC_ALL=  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »