#ident "@(#)README	1.10 02/12/96 SMI"
#
#
# Copyright 02/12/96 Sun Microsystems, Inc. All Rights Reserved
#
Using the xapia (XMA and XMT) Examples
======================================


Running the XMA Example
-----------------------

If you do not have the Solstice X.400 Client Toolkit, go to step 4.

If you want to run the examples from a machine where you have installed the 
Solstice X.400 Client Toolkit, first do steps 1, 2 and 3 below to configure 
your local client toolkit database. See the Solstice X.400 Client Toolkit 
Administrator's Guide for more information on how to do this.

1.	Add a remote message server (an MTA providing P3 access).

	If the message server is a Solstice X400 MTA, use x400tool to find 
	out its OSI Selectors and network address, remembering to enter a 
	transport selector of P3.

2.	Add a message client with the following parameters:

		Name:		 user1

		Country:	 US

		ADMD:		 attmail

		PRMD: 		 sun

		Organization:	 user1

		Remote Server:	 The server (MTA) you added in Step 1.

3.	Add another message client with the following parameters:

		Name:		 user2

		Country:	 US

		ADMD: 		 attmail

		PRMD:		 sun

		Organization:	 user2

		Remote Server:	 The server (MTA) you added in Step 1.

4.	On the machine hosting the MTA (in other words, on the machine where 
	you installed the Solstice X.400 Messaging Server), use x400tool 
	(see the Solstice X.400 Messaging Server Administrator's Guide) to do
	the following:

	a.  Configure the MTA as described in Chapter 4 "Configuring Your 
	    Local Messaging Server" in the Solstice X.400 Messaging Server 
	    Administrator's Guide.

	b.  Add two new user agents, user1 and user2. If the agents are on
	    another machine (in other words, if the agents are on a machine 
	    where you installed the Solstice X.400 Client Toolkit), set the 
	    User Agent type to Remote.

	c.  Modify the routing for user1 and user2. Set the routings so that
 	    the parameters are the same as those specified in Step 2 and 
	    Step 3 above.

Now run the test:

6.      Add /opt/SUNWconn/mhs/lib to your LD_LIBRARY_PATH, and compile the
	example.

7.	Submit a message by typing:

		hostname% bin-sparc/ex_MAs user1

	or on an x86 machine:

                hostname% bin-i386/ex_MAs user1

	This program binds to the MTA as user1 and submits a message to 
	user2. When prompted, type a message subject and the name of a file 
	to send.

8.	Receive the message by typing:

		hostname% bin-sparc/ex_MAd user2

	or on an x86 machine:

                hostname% bin-i386/ex_MAd user2

	This program binds to the MTA as user2 and retrieves the message you 
	sent in Step 7.

Use x400tool to monitor the status of messages. You will see that user1 has 
1 message submitted to the MTA by the user agent and user2 has 1 message 
delivered to the user agent by the MTA. You can use x400trace and xapiatrace 
(see the Solstice X.400 Messaging Server Administrator's Guide and Solstice 
X.400 Client Toolkit 9.0 Administrator's Guide respectively) to give you 
additional information.

For a more complex test, you can connect the user agents to two different 
MTAs. To do this, add both remote message servers to your client toolkit 
database, and connect a message client (user1 and user2) to each one.
Additionally, use x400tool to define the route between the two MTAs.


Running the XMT Example
-----------------------

To run the XMT examples, follow the steps described above with the following 
changes:

	 Replace the user agent user1 with the P1 user gw1; Replace the user
 	  agent user2 with the P1 user gw2

	 Submit a message by typing:

		hostname% bin-sparc/ex_MTs gw1

	 Receive a message by typing:

		hostname% bin-sparc/ex_MTr gw2

Note that the XMT examples will work only if you have the Solstice X.400 
Messaging Server.
