Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Scripting for Mail, URLs, and other Java EE resources > Configure mail, URLs, and resource environment entries with wsadmin scripting


Configure new mail providers using wsadmin.sh

We can use scripting and wsadmin.sh to configure new mail providers. See the topic Starting the wsadmin scripting client article for more information.

Configure a new mail provider:


Procedure

  1. 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)
    

  2. Get required attributes:

      ### Jacl

      $AdminConfig required MailProvider
      

      ### Jython

      print AdminConfig.required('MailProvider')
      

    Example output:

    Attribute       Type
    name       String 

  3. Set up required attributes:

      ### Jacl

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

      ### Jython

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

  4. Create the mail provider:

      ### Jacl

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

      ### Jython

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

    Example output:

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

  5. Save the configuration changes. See the topic Saving configuration changes with wsadmin.sh for more information.

  6. Synchronize the node. See the topic Synchronizing nodes with the wsadmin tool for more information.


Use the wsadmin scripting AdminConfig object for scripted administration
Saving configuration changes with wsadmin.sh
Synchronize nodes using wsadmin.sh
Start the wsadmin scripting client using wsadmin.sh


Related


Commands for the AdminConfig object using wsadmin.sh

+

Search Tips   |   Advanced Search