int smfi_chgfrom( SMFICTX *ctx, const char *mail, char *args );
Change the envelope sender (MAIL From) of the current message.
|Called When||Called only from xxfi_eom.|
|Effects||Change the envelope sender (MAIL From) of the current message.|
|ctx||Opaque context structure.|
|The new sender address.|
smfi_chgfrom will fail and return MI_FAILURE if:
- mail is NULL.
- Changing the sender in the current connection state is invalid.
- A network error occurs.
- SMFIF_CHGFROM was not set when smfi_register was called.
Otherwise, it will return MI_SUCCESS.
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.