Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
fix: userdb
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpieters committed Sep 20, 2022
1 parent 6e3000c commit 0cfc008
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions syncer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import sys
import os
import string
Expand All @@ -14,7 +15,6 @@
import urllib3
urllib3.disable_warnings()

import logging
logging.basicConfig(format='%(asctime)s %(message)s',
datefmt='%d.%m.%y %H:%M:%S', level=logging.INFO)

Expand Down Expand Up @@ -204,7 +204,9 @@ def read_dovecot_passdb_conf_template():

return data.substitute(
ldap_uri=config['LDAP_URI'],
ldap_base_dn=config['LDAP_BASE_DN']
ldap_base_dn=config['LDAP_BASE_DN'],
ldap_bind_dn=config['LDAP_BIND_DN'],
ldap_bind_dn_password=config['LDAP_BIND_DN_PASSWORD']
)


Expand Down
7 changes: 6 additions & 1 deletion templates/dovecot/ldap/passdb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ uris = $ldap_uri
ldap_version = 3
base = $ldap_base_dn
auth_bind = yes
auth_bind_userdn = uid=%Ln,$ldap_base_dn
#auth_bind_userdn = uid=%Ln,$ldap_base_dn
dn = $ldap_bind_dn
dnpass = $ldap_bind_dn_password
pass_attrs = =user=%{ldap:mail}
pass_filter = (mail=%u)
user_attrs = =user=%{ldap:mail}

0 comments on commit 0cfc008

Please sign in to comment.