MariaDB database for users and passwords?
John Stoffel
john at stoffel.org
Fri Nov 8 21:52:34 EET 2019
>>>>> "Ken" == Ken Wright via dovecot <dovecot at dovecot.org> writes:
Ken> On 11/8/19 1:05 PM, @lbutlr via dovecot wrote:
>> On 07 Nov 2019, at 23:00, Ken Wright <wizard at bnnorth.net> wrote:
>>> I'm getting an error message saying "user unknown" when I send test
>>> emails to my server.
>> You need to look at the logs.
Ken> Here's what I see:
Ken> ***
Ken> root at grace:/etc/postfix# tail /var/log/mail.log
Ken> Nov 8 13:28:09 grace postfix/smtpd[5382]: connect from
Ken> grace.koalatyworks.com[127.0.0.1]
Ken> Nov 8 13:28:09 grace postfix/smtpd[5382]: disconnect from
Ken> grace.koalatyworks.com[127.0.0.1] ehlo=1 quit=1 commands=2
Ken> Nov 8 13:28:09 grace dovecot: imap-login: Disconnected (disconnected
Ken> before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1,
Ken> lip=127.0.0.1, TLS handshaking: SSL_accept() syscall failed: Success,
Ken> session=<PE2g8dmWyr1/AAAB>
Ken> Nov 8 13:28:53 grace dovecot: auth: Fatal: Unknown passdb driver 'mysql'
This line right here looks to be the problem. Do you have mysql
support compiled into your Dovecot instance? I run my own domain and
I thought I'd do SQL (mysql or sqllite) for my stuff, but the
compilications were so much that it was simpler to drop to plain text
files.
IMHO, if you have less than 500 users, just got flat files to start.
But back to your case, did you install the 'dovecot-mysql' package
with your distribution? For debian, I search with:
apt-cache search dovecot | grep mys
For redhat you could do:
yum search dovecot
and see if you need to install it.
Ken> And here's the output from dovecot -n:
Ken> ***
Ken> # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
Ken> # Pigeonhole version 0.4.21 (92477967)
Ken> # OS: Linux 4.15.0-66-generic x86_64 Ubuntu 18.04.3 LTS ext4
Ken> auth_mechanisms = plain login
Ken> auth_verbose = yes
Ken> mail_home = /var/mail/vhosts/%d/%n
Ken> mail_location = maildir:/var/mail/vhosts/%d/%n/
Ken> mail_privileged_group = mail
Ken> managesieve_notify_capability = mailto
Ken> managesieve_sieve_capability = fileinto reject envelope
Ken> encoded-character vacation subaddress comparator-i;ascii-numeric
Ken> relational regex imap4flags copy include variables body enotify
Ken> environment mailbox date index ihave duplicate mime foreverypart extracttext
Ken> namespace inbox {
Ken> inbox = yes
Ken> location =
Ken> mailbox Drafts {
Ken> special_use = \Drafts
Ken> }
Ken> mailbox Junk {
Ken> special_use = \Junk
Ken> }
Ken> mailbox Sent {
Ken> special_use = \Sent
Ken> }
Ken> mailbox Trash {
Ken> special_use = \Trash
Ken> }
Ken> prefix =
Ken> }
Ken> passdb {
Ken> args = username_format=%u scheme=SSHA512
Ken> driver = mysql
Ken> }
Ken> passdb {
Ken> args = /etc/dovecot/dovecot-sql.conf.ext
Ken> driver = sql
Ken> }
Ken> passdb {
Ken> args = /etc/dovecot/dovecot-sql.conf.ext
Ken> driver = sql
Ken> }
Ken> plugin {
Ken> sieve = file:~/sieve;active=~/.dovecot.sieve
Ken> sieve_after = /var/mail/vmail/sieve-after
Ken> sieve_before = /var/mail/vmail/sieve-before
Ken> sieve_dir = ~/sieve
Ken> }
Ken> postmaster_address = postbot at koalatyworks.com
Ken> protocols = imap lmtp sieve
Ken> service auth-worker {
Ken> user = vmail
Ken> }
Ken> service auth {
Ken> unix_listener /var/spool/postfix/private/auth {
Ken> group = postfix
Ken> mode = 0660
Ken> user = postfix
Ken> }
Ken> unix_listener /var/spool/postfix/private/dovecot-auth {
Ken> group = postfix
Ken> mode = 0660
Ken> user = postfix
Ken> }
Ken> unix_listener auth-userdb {
Ken> mode = 0600
Ken> user = vmail
Ken> }
Ken> user = dovecot
Ken> }
Ken> service dict {
Ken> unix_listener dict {
Ken> group = vmail
Ken> mode = 0600
Ken> user = vmail
Ken> }
Ken> }
Ken> service imap-login {
Ken> inet_listener imap {
Ken> port = 143
Ken> }
Ken> inet_listener imaps {
Ken> port = 993
Ken> ssl = yes
Ken> }
Ken> }
Ken> service lmtp {
Ken> unix_listener /var/spool/postfix/private/dovecot-lmtp {
Ken> group = postfix
Ken> mode = 0600
Ken> user = postfix
Ken> }
Ken> }
Ken> ssl = required
Ken> ssl_cert = </etc/letsencrypt/live/koalatyworks.com/fullchain.pem
Ken> ssl_cipher_list =
Ken> ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:ADH:!AECDH:!MD5:!DSS
Ken> ssl_client_ca_dir = /etc/ssl/certs
Ken> ssl_key = # hidden, use -P to show it
Ken> userdb {
Ken> args = uid=5000 gid=5000 home=/var/mail/vhosts/%d/%n
Ken> driver = mysql
Ken> }
Ken> userdb {
Ken> args = uid=5000 gid=5000 home=/var/mail/vhosts/%d/%n
Ken> driver = static
Ken> }
Ken> protocol imap {
Ken> imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
Ken> mail_max_userip_connections = 10
Ken> }
Ken> protocol lda {
Ken> deliver_log_format = msgid=%m: %$
Ken> mail_plugins = sieve
Ken> quota_full_tempfail = yes
Ken> rejection_reason = Your message to <%t> was automatically rejected:%n%r
Ken> }
Ken> protocol lmtp {
Ken> mail_plugins = sieve
Ken> postmaster_address = postbot at koalatyworks.com
Ken> }
Ken> ***
Ken> I hope someone can explain to me just what protocol I should be using to
Ken> access a MariaDB database.
Ken> Ken
Ken> --
Ken> Registered Linux user #483005
Ken> If you ever think international relations make sense, remember this:
Ken> because a Serb shot an Austrian in Bosnia, Germany invaded Belgium.
More information about the dovecot
mailing list