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


This routine is used to determine the host name associated with a particular channel.

The channel name can be specified in one of three ways:

In all cases, the official host name of the selected channel is the host name that is returned. The official host name for a channel is the one that appears on the second line of the channel definition in the MTA configuration file, imta.conf.

The following table lists the item codes and any associated arguments:

Item Codes  

Additional Arguments  



const char *channel

size_t channel_len

Explicitly specify a channel name for the official host name. This item code must be followed by the two additional call arguments, specifying: 

  1. The channel name.

  2. The length in bytes of that channel name.

    If a value of 0 is passed for the length, the channel name must be NULL terminated.


mta_dq_t *dq_ctx

Use the channel associated with the specified dequeue context. This item code must be followed by one additional call argument: a pointer to a dequeue context generated by mtaDequeueStart().


mta_item_list_t *item_list

Specify a pointer to an item list array that is terminated with a final array entry that has an item code value of 0. For further information on item lists, see Item Codes and Item Lists.

When none of the above item codes are specified, the channel name is taken from the runtime environment, using PMDF_CHANNEL environment variable.

On successful completion, the host name is stored in the buffer pointed at by the host argument, and the value of the host argument is returned.