On 2025-12-27 08:38, Steve Litt via dovecot wrote:
Cam Ellison via dovecot said on Fri, 26 Dec 2025 20:31:57 -0800
On 2025-12-26 16:42, John Hill via dovecot wrote:
- Recreate it cleanly: cat > /etc/dovecot/conf.d/auth-sql.conf.ext <<'EOF' passdb { driver = sql args = /etc/dovecot/sql.conf.ext }
userdb { driver = sql args = /etc/dovecot/sql.conf.ext }
This is your problem. What you have above is suitable up to and including version 2.3. It no longer works.
Look at the instructions for converting 2.3 to 2.4 on the Dovecot website. Which exact URL? There are several pages on this subject, and they tend to contradict each other.
This one: https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html.
The change in approach between the two is significant.
Importantly for this situation, auth-sql.conf.ext should look something like this:
Authentication for SQL users. Included from 10-auth.conf.
<doc/wiki/AuthDatabase.SQL.txt>
sql_driver = mysql
mysql domainname { host=localhost dbname=dummydb user=dummyuser password=whatever port=3306 }
userdb sql { userdb_sql_query = SELECT CONCAT('/var/vmail/',email_username) AS home, 5000 AS uid, 5000 AS gid FROM usertable WHERE email_username = '%{user|username}' iterate_query = SELECT email_username AS username, domain FROM usertable } passdb sql { default_password_scheme = BLF-CRYPT passdb_sql_query = SELECT password FROM passwordtable WHERE ID IN (SELECT ID FROM usertable WHERE email_username='%{user|username}') }
Cheers
Cam