1<HTML> 2<HEAD><TITLE>smfi_chgfrom</TITLE></HEAD> 3<BODY> 4<!-- 5$Id: smfi_chgfrom.html,v 1.3 2006/12/21 18:30:35 ca Exp $ 6--> 7<H1>smfi_chgfrom</H1> 8 9<TABLE border="0" cellspacing=4 cellpadding=4> 10<!---------- Synopsis -----------> 11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12<PRE> 13#include <libmilter/mfapi.h> 14int smfi_chgfrom( 15 SMFICTX *ctx, 16 const char *mail, 17 char *args 18); 19</PRE> 20Change the envelope sender (MAIL From) of the current message. 21</TD></TR> 22 23<!----------- Description ----------> 24<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 25<TABLE border="1" cellspacing=1 cellpadding=4> 26<TR align="left" valign=top> 27<TH width="80">Called When</TH> 28<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD> 29</TR> 30<TR align="left" valign=top> 31<TH width="80">Effects</TH> 32<TD>Change the envelope sender (MAIL From) of the current message.</TD> 33</TR> 34</TABLE> 35 36<!----------- Arguments ----------> 37<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 38 <TABLE border="1" cellspacing=0> 39 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 40 <TR valign="top"><TD>ctx</TD> 41 <TD>Opaque context structure. 42 </TD></TR> 43 <TR valign="top"><TD>mail</TD> 44 <TD>The new sender address. 45 </TD></TR> 46 <TR valign="top"><TD>args</TD> 47 <TD>ESMTP arguments. 48 </TD></TR> 49 </TABLE> 50</TD></TR> 51 52<!----------- Return values ----------> 53<TR> 54<TH valign="top" align=left>RETURN VALUES</TH> 55 56<TD>smfi_chgfrom will fail and return MI_FAILURE if: 57<UL><LI>mail is NULL. 58 <LI>Changing the sender in the current connection state is invalid. 59 <LI>A network error occurs. 60 <LI>SMFIF_CHGFROM was not set when <A href="smfi_register.html">smfi_register</A> was called. 61</UL> 62Otherwise, it will return MI_SUCCESS. 63</TD> 64</TR> 65 66<!----------- Notes ----------> 67<TR align="left" valign=top> 68<TH>NOTES</TH> 69<TD> 70A filter which calls smfi_chgfrom must have set the SMFIF_CHGFROM flag 71in the smfiDesc_str passed to 72<A href="smfi_register.html">smfi_register</A>. 73<BR> 74Even though all ESMTP arguments could be set via this call, 75it does not make sense to do so for many of them, 76e.g., SIZE and BODY. 77Setting those may cause problems, proper care must be taken. 78Moreover, there is no feedback from the MTA to the milter 79whether the call was successful. 80</TD> 81</TR> 82 83</TABLE> 84 85<HR size="1"> 86<FONT size="-1"> 87Copyright (c) 2006 Sendmail, Inc. and its suppliers. 88All rights reserved. 89<BR> 90By using this file, you agree to the terms and conditions set 91forth in the LICENSE. 92</FONT> 93</BODY> 94</HTML> 95