email_server: dovecot: Authenticate using PAM instead of LDAP

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-10-22 17:57:57 -07:00 committed by James Valleroy
parent cb8c23c28d
commit afc958a884
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 5 additions and 45 deletions

View File

@ -1,22 +1,10 @@
# Direct edits to this file will be lost!
# Manage your settings on Plinth <https://localhost/plinth/apps/email_server>
# Outlook and Windows Mail works only with LOGIN mechanism, not the standard
# PLAIN:
auth_mechanisms = plain login
passdb {
driver = ldap
args = /etc/dovecot/freedombox-ldap-passdb.conf.ext
# Block the default passdb lookup (pam, 10-auth.conf)
result_failure = return-fail
result_internalfail = return-fail
result_success = return-ok
}
userdb {
driver = ldap
args = /etc/dovecot/freedombox-ldap-userdb.conf.ext
# Block the default userdb lookup (passwd, 10-auth.conf)
result_failure = return-fail
result_internalfail = return-fail
result_success = return-ok
}
# Allow authentication from attempts that provide username as
# user@domain.example.
auth_username_format = %Ln

View File

@ -1,8 +0,0 @@
# Direct edits to this file will be lost!
# Manage your settings on Plinth <https://localhost/plinth/apps/email_server>
uris = ldap://127.0.0.1
base = dc=thisbox
auth_bind = yes
auth_bind_userdn = uid=%u,ou=users,dc=thisbox

View File

@ -1,20 +0,0 @@
# Direct edits to this file will be lost!
# Manage your settings on Plinth <https://localhost/plinth/apps/email_server>
uris = ldap://127.0.0.1
base = dc=thisbox
user_attrs = \
=home=%{ldap:homeDirectory}, \
=uid=%{ldap:uidNumber}, \
=gid=%{ldap:gidNumber}, \
=mail=maildir:~/Maildir:LAYOUT=index
# Support user lookup by username
user_filter = (&(objectClass=posixAccount)(uid=%Ln)(!(uidNumber=0)))
# For doveadm
iterate_attrs = =user=%{ldap:uid}
iterate_filter = (objectClass=posixAccount)