Retrieving all email addresses from LDAP


This article applies to:

  • Trustwave MailMarshal (SEG) 6.4 and above
  • Trustwave ECM/MailMarshal Exchange 7.X
  • Trustwave SPE Connector Agent

Question:

  • How can I get a full list of every email address in a LDAP directory?
  • Scraping the LDAP directory
  • Need to list all email addresses in the company for DHA
  • Want to use the "scrape" method from MailMarshal 6.1

Procedure:

The following tips can be useful if you want to get a list of all email addresses in a LDAP directory when you are using a Connector or the Connector Agent.

  • You can set up the LDAP connection to "scrape" all addresses in any group you retrieve from the directory.
    1. In the LDAP Connection properties window > LDAP server tab, click Advanced.
      • For MailMarshal (SEG) 10, simply edit the connector to see the User Attributes tab.
      • For Connector Agent, select a Connector > Server Info tab, and then click Advanced.
    2. On the User Attributes tab of the Advanced LDAP properties window, in the User Class Names field enter top
  • You can create a user group that includes all items in a container.
    1. In the New User Group wizard, choose to import groups from a LDAP connection.
    2. Click Browse and select any group.
    3. On the Import LDAP User Groups page, replace the group name. Type the name of a container, preceded by *.
      • For instance, to retrieve all email addresses from the example.com domain, enter *,DC=Example,DC=Com

When you set up the connector and group as above, every email address in every attribute of each item in the group is retrieved.

Notes:

MailMarshal SMTP versions 6.1 through 6.3 do not require or recognize the class name "top". These versions do not allow filtering by class name.

If you want to maintain the version 6.1 behavior in later versions, you can use the User Class Name "top", as above.

If you find that this setting does not work as expected, you can revert to the version 6.1 code by setting a Registry value:

  1. On the Array Manager, open Regedit
  2. Navigate to the MailMarshal Array Manager registry key. In MailMarshal SMTP version 6.8 32 bit:
    HKEY_LOCAL_MACHINE\Software\Marshal\MailMarshal\Components\Manager
    • For details of the locations for each MailMarshal version, see the following Trustwave Knowledgebase articles:
      • Q14003 (MailMarshal Exchange)
  3. Create a DWORD value UseAlternateScraping
  4. Set the value to 1

As always, take due care when editing the Registry.


Last Modified 4/1/2020.
https://support.trustwave.com/kb/KnowledgebaseArticle11877.aspx