
Ich versuche, mit Thunderbird auf meine E-Mails zuzugreifen, habe aber ein Authentifizierungsproblem. Ich verwende gültige Zertifikate und habe adduser testuser
ein einfaches Passwort verwendet (1 Buchstabe, 8 haben anscheinend nichts geändert).
Den Protokollen zufolge kann der Benutzer nicht gefunden werden. Ich habe weder 10-auth.conf noch irgendetwas in conf.d geändert. Muss ich das tun? Hier ist meine dovecot.conf- und Protokolldatei
disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
driver = passwd
}
passdb {
driver = shadow
args = blocking=no
}
protocols = " imap"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
ssl=required
ssl_cert = </etc/letsencrypt/live/MY_DOMAIN.COM/fullchain.pem
ssl_key = </etc/letsencrypt/live/MY_DOMAIN.COM/privkey.pem
auth_verbose=yes
auth_debug=yes
auth_debug_passwords=yes
mail_debug=yes
Logdatei
dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
dovecot: auth: Debug: auth client connected (pid=5293)
dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011session=dtEqfrs9fwBo3ndE#011lip=1.2.3.4#011rip=123.123.123.123#011lport=143#011rport=6527
dovecot: auth: Debug: client passdb out: CONT#0111
dovecot: auth: Debug: client in: CONT#0111#011AHRlc3R1c2VyAHA= (previous base64 data may contain sensitive data)
dovecot: auth: Debug: shadow(testuser,123.123.123.123,<dtEqfrs9fwBo3ndE>): lookup
dovecot: auth: shadow(testuser,123.123.123.123,<dtEqfrs9fwBo3ndE>): unknown user
dovecot: auth: Debug: client passdb out: FAIL#0111#011user=testuser
dovecot: auth: Debug: client in: AUTH#0112#011PLAIN#011service=imap#011secured#011session=dtEqfrs9fwBo3ndE#011lip=1.2.3.4#011rip=123.123.123.123#011lport=143#011rport=6527#011resp=AHRlc3R1c2VyAHA= (previous base64 data may contain sensitive data)
dovecot: auth: Debug: shadow(testuser,123.123.123.123,<dtEqfrs9fwBo3ndE>): lookup
dovecot: auth: shadow(testuser,123.123.123.123,<dtEqfrs9fwBo3ndE>): unknown user
dovecot: auth: Debug: client passdb out: FAIL#0112#011user=testuser
dovecot: imap-login: Disconnected (auth failed, 2 attempts in 8 secs): user=<testuser>, method=PLAIN, rip=123.123.123.123, lip=1.2.3.4, TLS, session=<dtEqfrs9fwBo3ndE>
dovecot: auth: Debug: auth client connected (pid=5296)
Antwort1
Höchstwahrscheinlich möchten Sie diePAM-Passwortdatenbank, nicht derShadow-Passwort-Datenbank. Wenn Sie jedoch die Schattendatenbank verwenden möchten, müssen Sie entweder die Auth-Worker-Prozesse deaktivieren (indem Sie args = blocking=no
den passdb
Abschnitt ergänzen) oder die Auth-Worker als Gruppe ausführen shadow
:
service auth-worker {
group = shadow
}
Beide Lösungen stammen aus dem Wiki. Eine weitere gute Lösung besteht darin, keine Systemkennwörter zu verwenden und stattdessen beispielsweise daspasswd-file DatenbankBeispiel mit Passwd-Datei:
passdb {
driver = passwd-file
args = scheme=SHA512-CRYPT username_format=%u /etc/dovecot/passwords
}
Für Ihren Beispielbenutzer „testuser“ mit dem Kennwort „p“ /etc/dovecot/passwords
sähe das dann folgendermaßen aus:
testuser:{SHA512-CRYPT}$6$R6MuJ818vCtvNw1y$ALycf9nfP8mL7EZysLTZJlnNGuygRHhr9xCDFi8tlIHND4i6fI8wwY6t0dAL6rOY0Jat2iZmQgqz4vEFT/0fa1
Dieser große Hash-Wert kann wie folgt abgerufen werden doveadm pw -s SHA512-CRYPT
(aufgrund des Saltings ist er jedes Mal anders).