비둘기장으로 인증하기

비둘기장으로 인증하기

Thunderbird를 사용하여 이메일에 액세스하려고 하는데 인증 문제가 발생했습니다. 나는 유효한 인증서를 사용하고 있으며 adduser testuser간단한 비밀번호를 사용했습니다(문자 1개, 8개는 아무것도 변경되지 않은 것 같습니다).

로그에 따르면 사용자를 찾을 수 없습니다. 저는 10-auth.conf나 conf.d의 어떤 것도 수정하지 않았습니다. 수정해야 합니까? 여기 내 dovecot.conf 및 로그 파일이 있습니다.

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

로그 파일

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)

답변1

아마도 당신은팸 비밀번호 데이터베이스, 아닙니다섀도우 비밀번호 데이터베이스. 그러나 섀도우 데이터베이스를 사용하려면 auth-worker 프로세스를 비활성화하거나( 섹션 args = blocking=no에 추가하여 passdb) auth-workers를 그룹으로 실행해야 합니다 shadow.

service auth-worker {
  group = shadow
}

두 솔루션 모두 위키에서 나왔습니다. 또 다른 좋은 해결책은 시스템 비밀번호를 사용하지 않고 대신 다음을 사용하는 것입니다.비밀번호 파일 데이터베이스. passwd 파일의 예:

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

}

그러면 비밀번호가 "p"인 사용자 "testuser"의 경우 /etc/dovecot/passwords다음과 같습니다.

testuser:{SHA512-CRYPT}$6$R6MuJ818vCtvNw1y$ALycf9nfP8mL7EZysLTZJlnNGuygRHhr9xCDFi8tlIHND4i6fI8wwY6t0dAL6rOY0Jat2iZmQgqz4vEFT/0fa1

그 거대한 해시 값은 다음을 통해 얻을 수 있습니다 doveadm pw -s SHA512-CRYPT(솔팅으로 인해 매번 달라질 수 있음).

관련 정보