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. -- Everybody wants a rock to wrap a piece of string around
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.
>>>>> "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.
On 08 Nov 2019, at 11:56, Ken Wright <wizard at bnnorth.net> wrote:> Nov 8 13:28:53 grace dovecot: auth: Fatal: Unknown passdb driver ?You do not have Dovecot compiled with support for mysql' -- Love is like oxygen / You get too much / you get too high / Not enough and you're gonna die