LDAP support
William Edwards
wedwards at cyberfusion.nl
Thu Oct 28 10:10:26 CEST 2021
Lars Täuber schreef op 2021-10-28 09:50:
> Hi everybody,
>
> I solved my problem. It was a missing permission. The attribute "cn"
> was not readable in a special branch of the ldap tree.
Thanks for sharing your solution with the list.
>
> Thanks again
> Lars
>
> On Wed, 27 Oct 2021 09:28:32 +0200
> Lars Täuber <taeuber at bbaw.de> wrote:
>
>> Hi Ralph,
>>
>> thanks for the docs.
>> I managed to configure two domains and test them successfully. But for
>> a third domain I get errors.
>> I don't know where to start debugging it. Could you nudge me in the
>> right direction?
>>
>> Here is an anonymized output:
>>
>> LDAP match uid=XYZ,ou=OU,dc=bbaw,dc=de
>> Exception on /mail/config-v1.1.xml [GET]
>> Traceback (most recent call last):
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/app.py",
>> line 2073, in wsgi_app
>> response = self.full_dispatch_request()
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/app.py",
>> line 1518, in full_dispatch_request
>> rv = self.handle_user_exception(e)
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/app.py",
>> line 1516, in full_dispatch_request
>> rv = self.dispatch_request()
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/app.py",
>> line 1502, in dispatch_request
>> return
>> self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/views.py",
>> line 84, in view
>> return current_app.ensure_sync(self.dispatch_request)(*args,
>> **kwargs)
>> File "/srv/automx2/venv/lib/python3.8/site-packages/flask/views.py",
>> line 158, in dispatch_request
>> return current_app.ensure_sync(meth)(*args, **kwargs)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/views/autoconfig.py",
>> line 44, in get
>> return self.config_from_address(address)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/views/__init__.py",
>> line 38, in config_from_address
>> data = self.config_response(local_part, domain_part, realname,
>> password)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/views/autoconfig.py",
>> line 52, in config_response
>> data = MozillaGenerator().client_config(local_part, domain_part,
>> realname)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/generators/mozilla.py",
>> line 60, in client_config
>> lookup_result: LookupResult =
>> self.ldap_lookup(f'{local_part}@{domain_part}', domain.ldapserver)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/generators/__init__.py",
>> line 54, in ldap_lookup
>> r = ldap.lookup(server.search_base,
>> server.search_filter.format(email_address),
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/ldap.py", line
>> 51, in lookup
>> cn = self.get_attribute(ldap_entry, attr_cn)
>> File
>> "/srv/automx2/venv/lib/python3.8/site-packages/automx2/ldap.py", line
>> 70, in get_attribute
>> log.debug(f'Returning list element "{value[0]}"')
>> IndexError: list index out of range
>> 127.0.0.1 - - [27/Oct/2021 09:18:23] "GET
>> /mail/config-v1.1.xml?emailaddress=name.surname at other.domain HTTP/1.1"
>> 500 -
>>
>>
>> I would sent you the corresponding SQL entries but not to the mailing
>> list if you like to have a look.
>>
>> Thanks
>> Lars
>>
>>
>>
>>
>>
>> Mon, 11 Oct 2021 18:05:41 +0200
>> Ralph Seichter <automx2 at seichter.de> ==> automx-users at sys4.de :
>> > I have added documentation for automx2 LDAP support. Please see
>> > https://rseichter.github.io/automx2/#ldap .
>> >
>> > -Ralph
--
With kind regards,
William Edwards
More information about the automx-users
mailing list