smfi_chgfrom

Synopsis


int smfi_chgfrom(
SMFICTX *ctx,
const char *mail,
char *args
);

Change the envelope sender (MAIL From) of the current message.

Description

Called When Called only from xxfi_eom.
Effects Change the envelope sender (MAIL From) of the current message.

Arguments

Argument Description
ctx Opaque context structure.
mail The new sender address.
args ESMTP arguments.

Return Values

smfi_chgfrom will fail and return MI_FAILURE if:

Otherwise, it will return MI_SUCCESS.

Notes

A filter which calls smfi_chgfrom must have set the SMFIF_CHGFROM flag in the smfiDesc_str passed to smfi_register.
Even though all ESMTP arguments could be set via this call, it does not make sense to do so for many of them, e.g., SIZE and BODY. Setting those may cause problems, proper care must be taken. Moreover, there is no feedback from the MTA to the milter whether the call was successful.