Account Data

Intro
Installation
SysAdmin
Objects
Transfer
Access
Directory
Data Files
Clusters
WebMail
Miscellaneous
Licensing
HowTo
  • Dictionary And Array Formats
  • Mailbox Formats
  • DataBase Formats
  • DataSet Formats
  • The CommuniGate Pro server uses several formats for the files it creates and maintains. All data is stored in the text form to make it easy to move files between platforms, and to process CommuniGatePro data with external programs.


    Dictionary and Array Formats

    The Dictionary format is used for most CommuniGate Pro setting files, as well as for some other files and data.

    A Dictionary value can be either a string, or an array, or a dictionary, so the format definition is recursive.

    Strings

    Strings are the very basic, unstructured data.

    A string is either an atom - a sequence of letters and digits, or a quoted string - a sequence of any printable symbols except the quotation mark and the backslash symbol enclosed into the quotation marks (").
    Examples: MyName   My2ndName   "My Name with spaces and the . sign"

    If you want to include the quotation mark into a string, include the backslash symbol and the quotation mark, if you want to include the backslash symbol into a quoted string, include 2 backslash symbols.

    Examples: "a \"string\" within string"   "Single \\ backslash"

    You can use the \r symbol combination to include the Return symbol into a string, you can use the \n symbol combination to include the Line Feed symbol into a string, and your can use the \e symbol combination to include the system-independent End-Of-Line symbol(s) into a string.

    Examples: "Line1\eLine2"   "TEXT3\rTEXT67\nTEXT78"
    Use the \r and \n combinations to include the return and line-feed characters only when they are NOT used as line separators.

    You can use the \t symbol combination to include the Tab symbol into a string.

    Example: "Line1:\tField1\tField2\eLine2:\tField1\tField2"

    You can use the \nnn symbol combination include any symbol into a string, if nnn is a 3-digit decimal number equal to the code of the desired symbol.

    Examples: "Using the \012 - Vertical Tabulation symbol"

    Arrays

    An array is a set of values, separated with the comma signs (,) and enclosed into the parenthesis.
    Example: (Element1 , "Element2" , "Element 3")

    An array element can be either a string, or an array, or a dictionary.

    Example: (Element1 , ("Sub Element1", SubElement2) , "Element 3")

    Any number of spaces, tabulation symbols, and/or line breaks (end-of-line symbols) can be placed between a parentheses and an element, and between an element and a comma sign.

    Example:
    (
    Element1  ,
      (    "Sub Element1",
       SubElement2  )
      ,
    "Element 3"  )

    Dictionaries

    A dictionary is a list of key-value pairs. Each key should be unique, and the key names are case-sensitive. The equal sign (=) is placed between the key and its value, end the semicolon symbol (;) is placed after a value. The set of key-value pairs is enclosed into the curvy brackets. Each key is a string.
    Example: {Key1=Element1; Key2 ="Element2" ; "Third Key"="Element 3"; }

    The value element in any key-value pair can be some other array and/or dictionary.

    Example: {Key1=(Elem1,Elem2); Key2={Sub1="XXX 1"; Sub2=X245;}; }

    Any number of spaces, tabulation symbols, and/or line breaks (end-of-line symbols) can be placed between a bracket and a pair, around the equal sign, and around the semicolon sign.

    Example:
    {
     Key1  =   (Elem1,Elem2)   ;
     Key2 = {  Sub1 = "XXX 1";
        Sub2=X245;  };
    }

    Arrays

    Below is the formal syntax for the Dictionary and Array formats:
    a-symbol   ::= A .. Z | a .. z | 0 .. 9
    atom       ::= 1*a-symbol
    s-symbol   ::= any printable symbol except " and \ |
                    \\   |   \"   |  \r  | \n  | \e | \nnn
    string     ::= " 1*s-symbol " | atom
    array      ::= ( [object [, object ...]] )
    dictionary ::= { [string = object ; [string = object ; ...]] }
    object     ::= string | array | dictionary
    


    Database Formats

    CommuniGate Pro uses databases (or, using the correct terms, database tables) for its Central Directory, for mailing lists, and for other purposes.

    Several different database types are supported, and the database type is defined by the database file (or directory) name extension.

    For all database types, the CommuniGate Pro Server provides required update synchronization mechanisms to let several processing threads retrieve and update database records simultaneously.

    The .tbd Format

    This is the simplest text database format. The file itself contains the database (table), as a set of text lines, each line containing tab-delimited text fields.

    The first file line is a special one, it contains tab-delimited strings with the database field names. Below is a sample of a .tbd database with the mail, cn and Limit fields and 3 records. The tabulation signs are marked as t :
    mail t cn t Limit
    user1@domain.com t First User t 1000
    user2@domain.com t Second User t 2000
    user3@domain.com t Third User t 1256

    If you want to add a field to the database, stop the server, and add the new field name to the first file line, separating it with the tabulation sign.

    Database fields can contain complex (dictionary-type, array-type) data elements. These elements are stored in the text format diescribed in the previous section.

    The .ldb Format

    The database file in the .ldb format does not contain any data. Instead, it contains the information about an external LDAP server that is used as the data storage. All requests that the CommuniGate Pro Server sends to such a database are converted into the LDAP requests and send to the specified LDAP server.

    The .ldp database file has the dictionary format (see above) with the following data: string
    Key NameTypeValue
    Serverstringthe name or the IP address of the LDAP server
    Fieldsarraydatabase field names, the first name should specify the "key" field
    LoginNamethe DN-name to use when logging into the LDAP server
    LoginPasswordstringthe password to use when logging to the LDAP server
    Below is a sample of an .ldb database file:
    {
      Server        = "node6.stalker.com";
      Fields        = ("mail","cn");
      LoginName     = "mail=remoteadmin";
      LoginPassword = "testpassword";
    }


    DataSet Formats

    Under construction

    CommuniGate® Pro Guide. Copyright © 1998-1999, Stalker Software, Inc.