Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

ProcedureTo Run Test Programs in a Messaging Environment

  1. Add a test channel to the bottom of the imta.cnf file.

    For example:

    (required blank line)
  2. Add rewrite rules to the top of the imta.cnf file.

    The following code fragment illustrates this:

    x_test $U%x-test@x-test-daemon
  3. To enable your test channel so that mail can be addressed to user@x_test, recompile your configuration and restart the SMTP server.

    Use the instructions found in the following code example:

    # imsimta cnbuild
    # imsimta restart dispatcher
  4. Create the text file.

    The file should be owned by the Messaging Server and reside in the same directory as the job_controller.cnf file. The following code example shows the lines you must add to the file:


    In the above example, file-path is the full path to your executable program.

  5. Make sure your executable has permissions and ownership such that the Messaging Server can run it.

  6. Restart the Job Controller.

    Use the command found in the following code example:

    # imsimta restart job_controller

    If the program performing enqueues is also a channel that will be dequeuing messages, and more specifically, is doing intermediate processing that leaves the envelope recipient addresses unchanged, then special rewrite rules must be used to prevent a message loop in that the channel just enqueues the mail back to itself. For directions on how to prevent a message loop and other specific examples of rewrite rules, see Preventing Mail Loops when Re-enqueuing Mail.