SYNOPSIS |
#include <libmilter/mfapi.h>
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:
- 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.
|
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.
|