# Copyright (c) 1999-2001 Jason Gunthorpe <jgg@debian.org>
# Copyright (c) 2004-2005,7,8 Joey Schulze <joey@infodrom.org>
# Copyright (c) 2001-2006 Ryan Murray <rmurray@debian.org>
-# Copyright (c) 2008 Peter Palfrader <peter@palfrader.org>
+# Copyright (c) 2008,2009 Peter Palfrader <peter@palfrader.org>
# Copyright (c) 2008 Martin Zobel-Helas <zobel@debian.org>
# Copyright (c) 2008 Marc 'HE' Brockschmidt <he@debian.org>
# Copyright (c) 2008 Mark Hymers <mhy@debian.org>
"icqUin": ["ICQ UIN",14],
"jabberJID": ["Jabber ID",15],
"privateSub": ["Debian-Private",16],
- "gender": ["Gender",17],
"birthDate": ["Date of Birth",18],
"mailDisableMessage": ["Mail Disabled",19],
"mailGreylisting": ["Mail Greylisting",20],
"mailRBL": ["Mail RBLs",22],
"mailRHSBL": ["Mail RHSBLs",23],
"mailWhitelist": ["Mail Whitelist",24],
- "mailSpamOptOut": ["Mail Spam Filtering",25],
+ "mailContentInspectionAction": ["mail C-I Action",25],
"VoIP": ["VoIP Address",26],
"comment": ["Comment",116],
"userPassword": ["Crypted Password",117],
"supplementaryGid": ["Groups the user is in"],
"allowedHost": ["Grant access to certain hosts"],
"privateSub": ["Debian-Private mailing list subscription"],
- "gender": ["ISO5218 Gender code (1=male,2=female,9=unspecified)"],
"birthDate": ["Date of Birth (YYYYMMDD)"],
"mailDisableMessage": ["Error message to return via SMTP"],
"mailGreylisting": ["SMTP Greylisting (TRUE/FALSE)"],
"mailRBL": ["SMTP time RBL lists"],
"mailRHSBL": ["SMTP time RHSBL lists"],
"mailWhitelist": ["SMTP time whitelist from other checks"],
- "mailSpamOptOut": ["Mail Spam Filtering"],
+ "mailContentInspectionAction": ["Content Inspection Action (reject, blackhole, markup)"],
"member": ["LDAP Group Member for slapd ACLs"],
"latitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
"longitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
Attrs[1][Attr] = [""];
return;
- if (Attr == "mailSpamOptOut" or Attr == "mailGreylisting" or Attr == "mailCallout"):
+ if (Attr == "mailGreylisting" or Attr == "mailCallout"):
if (NewValue.lower() != "true" and NewValue.lower() != "false"):
if (NewValue == "1"): NewValue = "true"
else:
# Connect to the ldap server
l = connectLDAP()
+UserDn = "uid=" + User + "," + BaseDn
if (BindUser != ""):
Password = getpass.getpass(BindUser + "'s password: ")
- UserDn = "uid=" + BindUser + "," + BaseDn
+ BindUserDn = "uid=" + BindUser + "," + BaseDn
else:
Password = ""
- UserDn = ""
+ BindUserDn = ""
try:
- l.simple_bind_s(UserDn,Password)
+ l.simple_bind_s(BindUserDn,Password)
except ldap.LDAPError,e:
print >> sys.stderr, "LDAP error:", e.args[0]['desc']
print >> sys.stderr, " ", e.args[0]['info']