Dovecot은 사용자가 MariaDB 데이터베이스에 있지만 존재하지 않는다고 말합니다.

Dovecot은 사용자가 MariaDB 데이터베이스에 있지만 존재하지 않는다고 말합니다.

저는 Dovecot 2.2.10의 사용자를 저장하기 위해 MariaDB를 사용합니다. Dovecot에서 "예기치 않게 연결이 끊어졌습니다" 오류가 계속 발생하는데 이유를 찾을 수 없습니다. 제가 볼 수 있는 것이 있나요?

메일 로그

Aug 29 22:46:15 xxxx postfix/qmgr[3467]: 544A8BB01: from=<>, size=4034, nrcpt=1 (queue active)
Aug 29 22:46:15 xxxx postfix/qmgr[3467]: 65FF1B94D: from=<<myemailaccont>@gmail.com>, size=2769, nrcpt=1 (queue active)
Aug 29 22:46:15 xxxx postfix/qmgr[3467]: CC292B999: from=<[email protected]>, size=411, nrcpt=1 (queue active)
Aug 29 22:46:15 xxxx dovecot: lmtp(1): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Aug 29 22:46:15 xxxx dovecot: lmtp(1): Connect from local
Aug 29 22:46:15 xxxx dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Aug 29 22:46:15 xxxx dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Aug 29 22:46:15 xxxx dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 29 22:46:15 xxxx dovecot: lmtp(12025): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Aug 29 22:46:15 xxxx dovecot: lmtp(12025): Connect from local
Aug 29 22:46:15 xxxx dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Aug 29 22:46:15 xxxx dovecot: auth: Debug: master in: USER#0111#[email protected]#011service=lmtp
Aug 29 22:46:15 xxxx dovecot: auth: Debug: master in: USER#0111#[email protected]#011service=lmtp
Aug 29 22:46:15 xxxx dovecot: lmtp(12027): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Aug 29 22:46:15 xxxx dovecot: lmtp(12027): Connect from local
Aug 29 22:46:15 xxxx dovecot: auth: Debug: master in: USER#0111#[email protected]#011service=lmtp
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: passwd([email protected]): lookup
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): passwd([email protected]): unknown user
Aug 29 22:46:15 xxxx dovecot: auth: Debug: password([email protected]): passdb doesn't support credential lookups
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: sql([email protected]): query: SELECT email as user, password FROM virtual_users WHERE email='[email protected]';
Aug 29 22:46:15 xxxx dovecot: lmtp(1): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: lmtp(12025): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: lmtp(12027): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: auth: Fatal: master: service(auth): child 12023 killed with signal 11 (core dumps disabled)
Aug 29 22:46:15 xxxx dovecot: auth-worker(12031): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Aug 29 22:46:15 xxxx dovecot: auth-worker(12031): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Aug 29 22:46:15 xxxx dovecot: auth-worker(12031): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 29 22:46:15 xxxx postfix/lmtp[12020]: 544A8BB01: to=<[email protected]>, relay=xxxx.com[private/dovecot-lmtp], delay=1782, delays=1782/0.02/0/0.06, dsn=4.3.0, status=deferred (host xxxx.com[private/dovecot-lmtp] said: 451 4.3.0 <[email protected]> Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command))
Aug 29 22:46:15 xxxx dovecot: lmtp(1): Disconnect from local: Successful quit
Aug 29 22:46:15 xxxx dovecot: auth-worker(12031): Debug: passwd([email protected]): lookup
Aug 29 22:46:15 xxxx dovecot: auth-worker(12031): passwd([email protected]): unknown user
Aug 29 22:46:15 xxxx postfix/lmtp[12021]: 65FF1B94D: to=<[email protected]>, relay=xxxx.com[private/dovecot-lmtp], delay=1689, delays=1689/0.02/0.01/0.04, dsn=4.3.0, status=deferred (host xxxx.com[private/dovecot-lmtp] said: 451 4.3.0 <[email protected]> Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command))
Aug 29 22:46:15 xxxx dovecot: lmtp(12025): Disconnect from local: Successful quit
Aug 29 22:46:15 xxxx postfix/lmtp[12024]: CC292B999: to=<[email protected]>, relay=xxxx.com[private/dovecot-lmtp], delay=1851, delays=1851/0.02/0.01/0.04, dsn=4.3.0, status=deferred (host xxxx.com[private/dovecot-lmtp] said: 451 4.3.0 <[email protected]> Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command))
Aug 29 22:46:15 xxxx dovecot: lmtp(12027): Disconnect from local: Successful quit
Aug 29 22:46:15 xxxx dovecot: auth-worker(12036): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Aug 29 22:46:15 xxxx dovecot: auth-worker(12036): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Aug 29 22:46:15 xxxx dovecot: auth-worker(12036): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 29 22:46:15 xxxx dovecot: auth-worker(12036): Debug: passwd([email protected]): lookup
Aug 29 22:46:15 xxxx dovecot: auth-worker(12036): passwd([email protected]): unknown user

중요한 부분은 다음과 같습니다.

Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: passwd([email protected]): lookup
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): passwd([email protected]): unknown user
Aug 29 22:46:15 xxxx dovecot: auth: Debug: password([email protected]): passdb doesn't support credential lookups
Aug 29 22:46:15 xxxx dovecot: auth-worker(12028): Debug: sql([email protected]): query: SELECT email as user, password FROM virtual_users WHERE email='[email protected]';
Aug 29 22:46:15 xxxx dovecot: lmtp(1): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: lmtp(12025): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: lmtp(12027): Error: userdb lookup([email protected]): Disconnected unexpectedly
Aug 29 22:46:15 xxxx dovecot: auth: Fatal: master: service(auth): child 12023 killed with signal 11 (core dumps disabled)

"자격 증명 조회를 지원하지 않습니다"는 무엇을 의미합니까? MariaDB 또는 Dovecot에 문제가 있습니까?

비둘기장 구성

[root@myhost ~]# doveconf -n
# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-1160.95.1.el7.x86_64 x86_64 CentOS Linux release 7.9.2009 (Core) ext4
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
mail_debug = yes
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail
mbox_write_locks = fcntl
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
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/xxxx.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/xxxx.com/privkey.pem
userdb {
  driver = passwd
}
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}
verbose_ssl = yes

마리아DB 테이블

사용자가 존재합니다:

MariaDB [(none)]> SELECT * FROM mailserver.virtual_domains;
+----+--------------------+
| id | name               |
+----+--------------------+
|  1 | xxxx.com           |
|  2 | xxxx.xxxx.com      |
|  3 | xxxx               |
|  4 | localhost.xxxx.com |
+----+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]> SELECT * FROM mailserver.virtual_users;
+----+-----------+--------------+----------------+
| id | domain_id | password     | email          |
+----+-----------+--------------+----------------+
|  1 |         1 | <mypassword> | [email protected] |
|  2 |         1 | <mypassword> | [email protected] |
+----+-----------+--------------+----------------+
2 rows in set (0.00 sec)

답변1

글쎄, 어쨌든 나는 이 문제를 해결했다. 그러나 실제로는 해결책이 아닙니다. 나는 단지 내 비둘기장을 최신 버전(2.2.10에서 2.2.36으로)으로 간단히 업데이트할 뿐입니다. 이것이 왜 작동하는지 모르겠습니다(어쩌면 초자연적인 힘 때문일 수도 있습니다). 따라서 dovecot 2.2.10이 MariaDB에서 제대로 작동하지 않는 이유를 아는 사람이 있다면 아래에 답변해 주세요.

관련 정보