Configure new mail providers using scripting

 

Procedure

  1. Start wsadmin

  2. Identify the parent ID:

    • Jacl:

      set node [$AdminConfig getid /Cell:mycell/Node:mynode/]
      

    • Jython

      node = AdminConfig.getid('/Cell:mycell/Node:mynode/')
      print node
      

    Example output:

    mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
    

  3. Get required attributes:

    • Jacl:

      $AdminConfig required MailProvider
      

    • Jython

      print AdminConfig.required('MailProvider')
      

    Example output:

    Attribute       Type
    name           String
    

  4. Set up required attributes:

    • Jacl:

      set name [list name MP1]
      set mpAttrs [list $name]
      

    • Jython

      name = ['name', 'MP1']
      mpAttrs = [name]
      

  5. Create the mail provider:

    • Jacl:

      set newmp [$AdminConfig create MailProvider $node $mpAttrs]
      $AdminConfig save
      

    • Jython

      newmp = AdminConfig.create('MailProvider', node, mpAttrs)
      print newmp
      

    Example output:

    MP1(cells/mycell/nodes/mynode|resources.xml#MailProvider_1)
    

  6. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object