[Dovecot] Feature: Move authentication to LUA and prepare for http based authentication, log last SASL logins to SQL

This commit is contained in:
andryyy
2021-06-04 14:27:33 +02:00
parent fc93c5e2a8
commit 6d22ae8d02
3 changed files with 79 additions and 42 deletions

View File

@@ -45,36 +45,25 @@ recipient_delimiter = +
auth_master_user_separator = *
mail_shared_explicit_inbox = yes
mail_prefetch_count = 30
passdb {
driver = lua
args = file=/etc/dovecot/lua/passwd-verify.lua blocking=yes
result_success = return-ok
result_failure = continue
result_internalfail = continue
}
# try a master passwd
passdb {
driver = passwd-file
args = /etc/dovecot/dovecot-master.passwd
master = yes
pass = yes
result_failure = continue
result_internalfail = continue
}
# try an app passwd
passdb {
driver = lua
args = file=/etc/dovecot/lua/app-passdb.lua blocking=yes
pass = yes
result_failure = continue
result_internalfail = continue
skip = authenticated
}
# check for regular password - if empty (e.g. force-passwd-reset), previous pass=yes passdbs also fail
# a return of the following passdb is mandatory
passdb {
args = /etc/dovecot/sql/dovecot-dict-sql-passdb.conf
driver = sql
result_success = return-ok
result_failure = continue
result_internalfail = continue
}
passdb {
driver = passwd-file
args = /etc/dovecot/dovecot-master.passwd
skip = authenticated
driver = lua
args = file=/etc/dovecot/lua/passwd-verify.lua blocking=yes
}
# Set doveadm_password=your-secret-password in data/conf/dovecot/extra.conf (create if missing)
service doveadm {