1
0
Fork 0

Create maildir from info we store in the other columns
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Daniele Tricoli 2022-05-19 19:53:04 +02:00
parent 663e2dbe42
commit 82c7837165
2 changed files with 1 additions and 2 deletions

View File

@ -33,7 +33,6 @@
username VARCHAR(255) NOT NULL PRIMARY KEY,
password VARCHAR(255) NOT NULL,
domain VARCHAR(128) NOT NULL,
maildir VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
quota BIGINT(20) NOT NULL DEFAULT 0,
created DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,

View File

@ -1,2 +1,2 @@
dbpath = {{ mailserver_auth_database }}
query = SELECT maildir FROM mailbox WHERE username = '%s' AND active = 'Y'
query = SELECT domain || "/" || substr(username, 1, instr(username, "@") - 1) || "/" FROM mailbox WHERE username = '%s' AND active = 'Y'