X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-info;h=2ed498a62beec60c5a152e25062cee27f0e10a2b;hp=8842e05b2f52614c6652ed7f494b382b47564273;hb=b22af6dffb85542441935a2c117105b38f0b53b5;hpb=b7bd5e0fd1dd4eb6a8f6f8b79f53dae09720f109 diff --git a/ud-info b/ud-info index 8842e05..2ed498a 100755 --- a/ud-info +++ b/ud-info @@ -20,7 +20,7 @@ # Copyright (c) 1999-2001 Jason Gunthorpe # Copyright (c) 2004-2005,7,8 Joey Schulze # Copyright (c) 2001-2006 Ryan Murray -# Copyright (c) 2008 Peter Palfrader +# Copyright (c) 2008,2009 Peter Palfrader # Copyright (c) 2008 Martin Zobel-Helas # Copyright (c) 2008 Marc 'HE' Brockschmidt # Copyright (c) 2008 Mark Hymers @@ -76,7 +76,7 @@ AttrInfo = {"cn": ["First Name", 101], "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], @@ -111,7 +111,7 @@ AttrPrompt = {"cn": ["Common name or first name"], "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"], @@ -252,7 +252,7 @@ def ChangeAttr(Attrs,Attr): 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: @@ -351,14 +351,15 @@ 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']