mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
dovecot: enable authentication cache
This commit is contained in:
@@ -59,7 +59,7 @@ def handle_dovecot_request(msg, db):
|
|||||||
if short_command == "L": # LOOKUP
|
if short_command == "L": # LOOKUP
|
||||||
parts = msg[1:].split("\t")
|
parts = msg[1:].split("\t")
|
||||||
keyname, user = parts[:2]
|
keyname, user = parts[:2]
|
||||||
namespace, type, arg = keyname.split("/", 3)
|
namespace, type, *args = keyname.split("/")
|
||||||
reply_command = "F"
|
reply_command = "F"
|
||||||
res = ""
|
res = ""
|
||||||
if namespace == "shared":
|
if namespace == "shared":
|
||||||
@@ -70,7 +70,7 @@ def handle_dovecot_request(msg, db):
|
|||||||
else:
|
else:
|
||||||
reply_command = "N"
|
reply_command = "N"
|
||||||
elif type == "passdb":
|
elif type == "passdb":
|
||||||
res = lookup_passdb(db, user, password=arg)
|
res = lookup_passdb(db, user, password=args[0])
|
||||||
if res:
|
if res:
|
||||||
reply_command = "O"
|
reply_command = "O"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
uri = proxy:/run/dovecot/doveauth.socket:auth
|
uri = proxy:/run/dovecot/doveauth.socket:auth
|
||||||
iterate_disable = yes
|
iterate_disable = yes
|
||||||
default_pass_scheme = plain
|
default_pass_scheme = plain
|
||||||
password_key = passdb/%w
|
password_key = passdb/%w/%u
|
||||||
user_key = userdb/%u
|
user_key = userdb/%u
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ auth_verbose = yes
|
|||||||
auth_debug = yes
|
auth_debug = yes
|
||||||
auth_debug_passwords = yes
|
auth_debug_passwords = yes
|
||||||
auth_verbose_passwords = plain
|
auth_verbose_passwords = plain
|
||||||
|
auth_cache_size = 100M
|
||||||
|
|
||||||
# Authentication for system users.
|
# Authentication for system users.
|
||||||
passdb {
|
passdb {
|
||||||
|
|||||||
Reference in New Issue
Block a user