CDB Lists and Maps

PureMessage supports lists and maps in CDB format. This on-disk format is useful for large lists and maps (that is, 5,000 entries or more), where the default plain text format can cause excessive memory consumption and latency.

To convert lists or maps to CDB format:

  1. Edit the list or map configuration file manually. Replace 'source = file:' with 'source = cdbfile:'. The match_type for CDB lists and maps must be either 'is' or 'mail-parts'. For example, in pmx/etc/lists.conf:
    <list internal-hosts>
        name = "Internal hosts"
        description = "Relay hosts regarded as internal"
        precious = yes
        source = cdbfile:internal-hosts
        match_type = is  

    In pmx/etc/maps.conf:

    <map notifications>
        name = "Notifications address map"
        description = "Notifications about messages processed by PureMessage..."
        source = cdbfile:notifications
        match_type = mail-parts
    Note The 'mail-parts’ match type is a simple substring match that does not accept regular expressions or wildcards. For example:

    Without an @ sign, the list entry matches a username (ignoring the domain name).

  2. Check to make sure that the list or map does not contain syntax that is not supported by the match_type used.
  3. Use pmx-makemap to compile the CDB files:
    pmx-makemap --all

When lists and maps from a central server are synchronized to edge servers in multi-server deployments (using either pmx-profile or publications), a scheduled job must be created, or an existing job modified, to compile the CDB lists locally with pmx-makemap after synchronization. For example, the resource-sync scheduled job can be modified as follows:

pmx-profile sync-from-db --clean; pmx-makemap --all

The resource-sync job will only synchronize files if they have changed on the central server, and pmx-makemap will only compile when the local file has changed.