Table of Contents

Name

imta_set_debug, imta_debug - MTA debugging interface

Synopsis

#include <imta.h>

void imta_set_debug(int mode);

void imta_debug(char *fmt,...);

Description

The SIMS IMTA is capable of producing voluminous debugging output both while enqueuing and dequeuing messages. By default, this output is disabled. To enable either enqueue or dequeue debugging output, call imta_set_debug() with the appropriate mode.

Since any of the routines imta_init(), imme_init(),or immd_init() may explicitly initialize the debugging flags, imta_set_debug() should be called after calls to those routines have been made.

mode is a bitwise OR of the follwing constants

IM_DEBUG_DEQUEUE to turn on debugging for dequeue activities (master programs)

IM_DEBUG_ENQUEUE to turn on debugging for enqueue activities (slave programs)

Turning on debugging with imta_set_debug() is equivalent to setting the options DEQUEUE_DEBUG=1 (for master programs) and/or MM_DEBUG=1 from slave programs.

The debugging information is output to a file created per process and typically located in

/var/opt/SUNWmail/imta/log/

The format of the file name is:

<channel-name>_{master|slave}.log-XXXXXX

where, channel-name is the name of the channel as in imta.cnf.

When debugging is turned on, imta_debug() writes the NULLterminated formatted string created from the format fmt and the optional arguments to the debug output file. The syntax of the format string is similar to that of the printf(3S) format argument.

Every message output to the debug file is preceeded by a timestamp including hours to hundredths of seconds. So for example, the call

imta_debug( «Invalid recipient: %s", username);

would result in output similar to

10:28:53.89: Invalid recipient: joseph

Note

Channel programs written using the Sun Internet Mail SDK should write enqueue/dequeue diagnostic output using imta_debug(). They should not, for instance, attempt to write to stdout or stderr. So doing will lead to the debug output going to unexpected places such as the job controller's log file or down a network connection.

Attributes

_______________________________________

Attribute Type
Attribute Value _______________________________________
Architecture
sparc, x86 _______________________________________
Availability
SUNWimsdk _______________________________________
MT-Level
MT-Safe _______________________________________
Interface Stability
Stable _______________________________________ |
|
|

See Also

imta_init(3) , imme_init(3) , immd_init(3)


Table of Contents