mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
support 'dovecot -A' iteration of all users
This commit is contained in:
parent
6d259a6e12
commit
ae8cd4efdf
@ -38,17 +38,19 @@ passdb {
|
|||||||
args = /etc/dovecot/dovecot-sql.conf.ext
|
args = /etc/dovecot/dovecot-sql.conf.ext
|
||||||
}
|
}
|
||||||
userdb {
|
userdb {
|
||||||
driver = static
|
driver = sql
|
||||||
args = uid=mail gid=mail home=$STORAGE_ROOT/mail/mailboxes/%d/%n
|
args = /etc/dovecot/dovecot-sql.conf.ext
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Configure the SQL to query for a user's password.
|
# Configure the SQL to query for a user's metadata and password.
|
||||||
cat > /etc/dovecot/dovecot-sql.conf.ext << EOF;
|
cat > /etc/dovecot/dovecot-sql.conf.ext << EOF;
|
||||||
driver = sqlite
|
driver = sqlite
|
||||||
connect = $db_path
|
connect = $db_path
|
||||||
default_pass_scheme = SHA512-CRYPT
|
default_pass_scheme = SHA512-CRYPT
|
||||||
password_query = SELECT email as user, password FROM users WHERE email='%u';
|
password_query = SELECT email as user, password FROM users WHERE email='%u';
|
||||||
|
user_query = SELECT email AS user, "mail" as uid, "mail" as gid, "$STORAGE_ROOT/mail/mailboxes/%d/%n" as home FROM users;
|
||||||
|
iterate_query = SELECT email AS user FROM users;
|
||||||
EOF
|
EOF
|
||||||
chmod 0600 /etc/dovecot/dovecot-sql.conf.ext # per Dovecot instructions
|
chmod 0600 /etc/dovecot/dovecot-sql.conf.ext # per Dovecot instructions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user