How can i add a booleanMatch type attribute

Zhang Huangbin zhbmaillistonly at
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/, 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,1) ],)

But i got this error message:
=> result: 2
*** ldap:// - 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 (
  NAME 'amavisLocal'
  DESC 'Is user considered local'
  EQUALITY booleanMatch

Best Regards.

Zhang Huangbin

- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux,
  CentOS, Debian, Ubuntu, FreeBSD:

More information about the python-ldap mailing list