Search Type:
Search for:

Language:

Product:
Category:
No categories for selected product

La búsqueda de GAL en dispositivos Good Mobile no funciona para buzones Exchange

Article ID: 1664 
Last Review: Jul,10 2009
Author: Meritxell Sevilla
Last updated by: Meritxell Sevilla APPLIES TO:
  • Parallels Operations Automation 2.6

Síntomas

En versiones de POA 2.6 y actualización 2.6 1, los buzones de correo con soporte para Good Link no pueden usar la prestación "Búsqueda GAL".

Causa

La prestación Búsqueda GAL usa el valor del atributo msExchQueryBaseDn y expera que este almacene el nombre distinguido (DN) de la unidad  organizativa (OU). Desde la versión de POA 2.6 hasta la versión 2.6 actualización 2, este atributo almacena el DN de la lista de drirecciones de la organización.

Resolución


  1. Acceda al servidor MPS (MPS01).
  2. Copie el siguiente texto y péguelo al archivo nuevo fixMsQueryBaseDn.vbs.

    Option Explicit
    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    Dim logFile
    Dim logFilename
    logFilename = WScript.ScriptFullName & ".log"
    Set logFile = fso.CreateTextFile( logFilename, True, True )

    Dim argsObj
    Set argsObj = WScript.Arguments
    If argsObj.Length <> 1 Then
     Usage
    ElseIf LCase(argsObj(0)) = "all" Then
     ProcessItems GetHostingOuDn(), 0
    Else
     Dim userObj
     logFile.WriteLine "Processing " & argsObj(0)
     Set userObj = GetObject(argsObj(0))
     ProcessUser userObj, GetObject(userObj.parent), 0
    End If

    WScript.Echo "Executed successfully. See log file " & logFilename & "."
    WScript.Quit(0)

    Sub Usage()
     Dim stdErr
     Set stdErr = WScript.StdErr
     stdErr.WriteLine "Usage:"
     stdErr.WriteLine "1. For fixing all mailboxes in Hosting OU and under it:"
     stdErr.WriteLine " cscript.exe /nologo fixMsQueryBaseDn.vbs ALL"
     stdErr.WriteLine "2. For fixing only one mailbox:"
     stdErr.WriteLine " cscript.exe /nologo fixMsQueryBaseDn.vbs LDAP://<LDAP path of mailbox>"
     stdErr.WriteLine "example: cscript.exe /nologo fixMsQueryBaseDn.vbs ""LDAP://cn=john,ou=neverhood inc,ou=provider,ou=Hosting,dc=he,dc=local"""
     WScript.Quit(1)
    End Sub

    Function GetHostingOuDn()
     Dim ObjSrv
     Set ObjSrv = GetObject("LDAP://RootDse")

     Dim dcSuffix
     dcSuffix = ObjSrv.Get("defaultNamingContext")
     Dim PemConfigObj
     Set PemConfigObj = GetObject("LDAP://CN=PEM Configuration,CN=System," & dcSuffix)

     Dim xmlObj
     Set xmlObj = CreateObject("Microsoft.XMLDOM")
     xmlObj.validateOnParse = True
     xmlObj.async = False
     xmlObj.loadXML(PemConfigObj.Get("adminDescription"))

     Dim hostingOuPath
     hostingOuPath = xmlObj.SelectSingleNode("//config/hostingOUName").text

     GetHostingOuDn = "OU="& hostingOuPath &"," & dcSuffix
    End Function

    Sub ProcessItems( byval name, byval level )
     Dim containerObj
     Set containerObj = GetObject("LDAP://"& name )
     containerObj.Filter = Array("user", "organizationalUnit")
     Dim objUser
     For Each objUser In containerObj
      Dim x
      For each x in objUser.objectClass
       If x = "user" Then
        ProcessUser objUser, containerObj, level
        Exit For
       ElseIf x = "organizationalUnit" Then
        ProcessOU objUser, level
        Exit For
       End If
      Next
     Next
    End Sub

    Function GetADPropertyAsString(obj, propName)
     Dim lastErr
     Dim propValue
     On Error Resume Next
     propValue = obj.Get(propName)
     lastErr = Err.Number
     On Error Goto 0
     ' &h8000500D  - PROPERTY NOT SET
     If (lastErr <> 0) And (lastErr <> &h8000500D) Then Err.Raise lastErr
     GetADPropertyAsString = "" & propValue
    End Function

    Sub ProcessUser( byval objUser, byval parentObj, byval level )
     logFile.Write Replace(Space(level), " ", ".") & " user "& objUser.cn & " ... "
     If "" = GetADPropertyAsString(objUser, "homeMDB") Then
      logFile.WriteLine " not a mailbox - skipping"
     ElseIf LCase(GetADPropertyAsString(objUser, "msExchQueryBaseDn")) <> LCase(parentObj.distinguishedName) Then
      objUser.Put "msExchQueryBaseDn", parentObj.distinguishedName
      objUser.SetInfo
      logFile.WriteLine " ""msExchQueryBaseDn"" replaced"
     Else
      logFile.WriteLine " mailbox is OK"
     End If
    End Sub

    Sub ProcessOU( byval objOu, byval level )
     logFile.WriteLine Replace(Space(level), " ", ".") & " Processing "& objOu.distinguishedName
     ProcessItems objOu.distinguishedName, level+1
    End Sub
  3. Guarde el archivo fixMsQueryBaseDn.vbs y ejecútelo desde la línea de comandos (Programas > Accesorios > Símbolo del Sistema) para revisar los buzones de correo.
    Para revisar todos los buzones de correo alojados:

    C:\>cscript.exe /nologo fixMsQueryBaseDn.vbs ALL

    Para revisar un buzón de correo particular:

    C:\>cscript.exe /nologo fixMsQueryBaseDn.vbs LDAP://<ruta LDAP del buzón>
  4. Compruebe el archivo fixMsQueryBaseDn.vbs.log para ver los resultados de la ejecución.

Keywords: gal lookup


Subscription for changes to this article Subscription for changes to this article

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields
 
 
 
 
 
 
For Home
For Business
For Hosters
For SaaS
For Developers
 
Desktop Virtualization
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac
- Parallels Desktop 4 for Windows & Linux
- Parallels Workstation Extreme
- Parallels Solution for Windows 7
Server Virtualization
- Parallels Server for Mac
- Parallels Server 4 Bare Metal
- Parallels Virtuozzo Containers
Automation
- Parallels Operations Automation
- Parallels Business Automation
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
More Products