smfi_setsymlist

Synopsis


int smfi_setsymlist(
SMFICTX    *ctx,
int        stage,
char       *macros
);

Set the list of macros that the milter wants to receive from the MTA for a protocol stage.

Description

Called When This function must only be called during xxfi_negotiate().
Effects This function can be used to override the list of macros that the milter wants to receive from the MTA.

Arguments

Argument Description
ctx the opaque context structure.
stage the protocol stage during which the macro list should be used. See the file include/libmilter/mfapi.h for legal values, look for the C macros with the prefix SMFIM_. Available protocol stages are at least the initial connection, HELO/EHLO, MAIL, RCPT, DATA, end of header, and the end of a message.
macros list of macros (separated by space). Example: "{rcpt_mailer} {rcpt_host}"

Return Values

MI_FAILURE is returned if

Otherwise MI_SUCCESS is returned.

Notes

There is an internal limit on the number of macros that can be set (currently 5), however, this limit is not enforced by libmilter, only by the MTA, but a possible violation of this restriction is not communicated back to the milter.