# smfi_chgfrom

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 is not set.

Otherwise, it will return MI_SUCCESS.

NOTES | A filter which calls smfi_chgfrom must have set the SMFIF_CHGFROM flag. 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.

Copyright (c) 2006 Proofpoint, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.