Table of Contents

Name

immd_defer - Defers a message for later processing.

Synopsis

#include <imta.h>

int immd_defer(immd_t md, int increment, char *reason);

Description

immd_defer() may be called to defer processing of the currently accessed message. The deferred message will be left in the message queues for processing by a subsequent processing job. If the message continues to remain in the message queues long enough, it will be returned automatically. See the message return and bouncing discussions in the «SIMS Administrator's Guide» for further details on this subject. Typically message processing is deferred when a temporary error (e.g., network link down, message recipient is over quota, etc.) or an unexpected error occurs. In the event of a permanent error, the message should be returned using immd_return().

Each time a message is deferred, an explanation of why the message is being deferred may be placed in the message's «delivery failure log". This failure log can be read with immd_read_failure_log() when the previously deferred message is again accessed. Should the message be returned as an undeliverable message by SIMS's MTA, a copy of the log will be included with the returned message. The log is only generated if you specify the reason argument. If this parameter is never used for a given message, then that message will have no delivery failure log. increment Specifies whether or not the message retry count should be incremented. When reason is specified (not NULL), this argument is ignored and the message retry count incremented. No firm guidelines exist to determine when the retry count should or should not be incremented. In general, however, it should be incremented. This helps postmasters to spot messages which have defied delivery.

Return Values

immd_defer() return IMRC_OK when successful, and one of the following error codes otherwise.

IMRC_BAD_CONTEXT
The dequeue context md has not been initialized or has been corrupted. Make sure imme_init() has been previously called.
IMRC_TEXT_TRUNCATED
The reason string contained more than IM_LOG_LEN characters, so it has been truncated to fit.

Attributes

_______________________________________

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

See Also

immd_init(3) , immd_return(3) , imta_error(3) , immd_read_failure_log(3)


Table of Contents