Help with Dovecot

So I tired to follow this tutorial but encountered an error.

Dovecot will always attempt to check the user_query before starting properly. The tutorial I followed does not mention anything about user_query. So Dovecot is checking, seeing it's not set, using the default method, and failing.

Anyone know how I might craft a user_query parameter that will work with this table?

CREATE TABLE `virtual_users` (
`id` INT NOT NULL AUTO_INCREMENT,
`domain_id` INT NOT NULL,
`password` VARCHAR(106) NOT NULL,
`email` VARCHAR(120) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Did you set in main.cf all virtual_* settings correctly?

and from Step 3:

nano /etc/postfix/mysql-virtual-mailbox-maps.cf 
		
user = usermail
password = mailpassword
hosts = 127.0.0.1
dbname = servermail
query = SELECT 1 FROM virtual_users WHERE email='%s'

Yes I have.

user = usermail
password = REDACTED
hosts = 127.0.0.1
dbname = servermail
query = SELECT 1 FROM virtual_users WHERE email='%s'

Not sure exactly what your problem might be. But I recently setup my own email server with dovecot. I used this tutorial https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mariadb-on-centos-7

And it has been working excellent for me, so maybe that can give some insight to your problem.

I'll see how well it help, and update the thread with the results.