MariaDB database for users and passwords?

Ken Wright wizard at bnnorth.net
Fri Nov 8 20:56:33 EET 2019


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.

Here's what I see:

***

root at grace:/etc/postfix# tail /var/log/mail.log
Nov  8 13:28:09 grace postfix/smtpd[5382]: connect from
grace.koalatyworks.com[127.0.0.1]
Nov  8 13:28:09 grace postfix/smtpd[5382]: disconnect from
grace.koalatyworks.com[127.0.0.1] ehlo=1 quit=1 commands=2
Nov  8 13:28:09 grace dovecot: imap-login: Disconnected (disconnected
before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1,
lip=127.0.0.1, TLS handshaking: SSL_accept() syscall failed: Success,
session=<PE2g8dmWyr1/AAAB>
Nov  8 13:28:53 grace dovecot: auth: Fatal: Unknown passdb driver 'mysql'
Nov  8 13:28:53 grace dovecot: master: Error: service(auth): command
startup failed, throttling for 60 secs
Nov  8 13:30:09 grace postfix/smtpd[6553]: connect from
grace.koalatyworks.com[127.0.0.1]
Nov  8 13:30:09 grace postfix/smtpd[6553]: disconnect from
grace.koalatyworks.com[127.0.0.1] ehlo=1 quit=1 commands=2
Nov  8 13:30:09 grace dovecot: imap-login: Disconnected (disconnected
before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1,
lip=127.0.0.1, TLS handshaking: SSL_accept() syscall failed: Success,
session=<EVbI+NmW0L1/AAAB>
Nov  8 13:30:09 grace dovecot: auth: Fatal: Unknown passdb driver 'mysql'
Nov  8 13:30:09 grace dovecot: master: Error: service(auth): command
startup failed, throttling for 60 secs
***

And here's the output from dovecot -n:

***

# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-66-generic x86_64 Ubuntu 18.04.3 LTS ext4
auth_mechanisms = plain login
auth_verbose = yes
mail_home = /var/mail/vhosts/%d/%n
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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 Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = username_format=%u scheme=SSHA512
  driver = mysql
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_after = /var/mail/vmail/sieve-after
  sieve_before = /var/mail/vmail/sieve-before
  sieve_dir = ~/sieve
}
postmaster_address = postbot at koalatyworks.com
protocols = imap lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/koalatyworks.com/fullchain.pem
ssl_cipher_list =
ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:ADH:!AECDH:!MD5:!DSS
ssl_client_ca_dir = /etc/ssl/certs
ssl_key =  # hidden, use -P to show it
userdb {
  args = uid=5000 gid=5000 home=/var/mail/vhosts/%d/%n
  driver = mysql
}
userdb {
  args = uid=5000 gid=5000 home=/var/mail/vhosts/%d/%n
  driver = static
}
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
  mail_max_userip_connections = 10
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  mail_plugins = sieve
  quota_full_tempfail = yes
  rejection_reason = Your message to <%t> was automatically rejected:%n%r
}
protocol lmtp {
  mail_plugins = sieve
  postmaster_address = postbot at koalatyworks.com
}
***

I hope someone can explain to me just what protocol I should be using to
access a MariaDB database.

Ken

-- 
Registered Linux user #483005

If you ever think international relations make sense, remember this:  
because a Serb shot an Austrian in Bosnia, Germany invaded Belgium.




More information about the dovecot mailing list