How can i add a booleanMatch type attribute
Zhang Huangbin
zhbmaillistonly at gmail.com
Sat Jan 30 14:14:37 CET 2010
Hi, all.
How can i add a booleanMatch type attribute with py-ldap?
Refer to python-ldap-2.3.10/Demo/ldapcontrols.py, i use below code to add new attribute:
----
l = ldap.initialize('ldap://localhost:389',trace_level=2)
l.add_ext_s(dn, modlist, serverctrls=[ BooleanControl('1.3.6.1.4.1.4203.1.10.1',1,1) ],)
----
But i got this error message:
----
=> result: 2
*** ldap://127.0.0.1:389/ - SimpleLDAPObject.result3 ((2, 1, -1),{})
=> LDAPError - UNAVAILABLE_CRITICAL_EXTENSION: {'info': 'critical extension is not recognized', 'desc': 'Critical extension is unavailable'}
----
I use amavisd-new attribute:
----
attributetype ( 1.3.6.1.4.1.15312.2.2.1.19
NAME 'amavisLocal'
DESC 'Is user considered local'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
----
--
Best Regards.
Zhang Huangbin
- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux,
CentOS, Debian, Ubuntu, FreeBSD: http://www.iredmail.org/
More information about the python-ldap
mailing list