1<HTML> 2<HEAD><TITLE>smfi_setsymlist</TITLE></HEAD> 3<BODY> 4<!-- 5$Id: smfi_setsymlist.html,v 1.7 2013-11-22 20:51:39 ca Exp $ 6--> 7<H1>smfi_setsymlist</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_setsymlist( 15 SMFICTX *ctx, 16 int stage, 17 char *macros 18); 19</PRE> 20Set the list of macros that the milter wants to receive from the MTA 21for a protocol stage. 22</TD></TR> 23 24<!----------- Description ----------> 25<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 26<TABLE border="1" cellspacing=1 cellpadding=4> 27<TR align="left" valign=top> 28<TH width="80">Called When</TH> 29<TD>This function must only be called during 30<A HREF="xxfi_negotiate.html">xxfi_negotiate()</A>. 31</TD> 32</TR> 33<TR align="left" valign=top> 34<TH width="80">Effects</TH> 35<TD>This function can be used to override the list of macros that the 36milter wants to receive from the MTA. 37</TD> 38</TR> 39</TABLE> 40 41<!----------- Arguments ----------> 42<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 43 <TABLE border="1" cellspacing=0> 44 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 45 46 <TR><TD>ctx</TD> 47 <TD>the opaque context structure. 48 </TD></TR> 49 50 <TR><TD>stage</TD> 51 <TD>the protocol stage during which the macro list should be used. 52 See the file 53 <CODE>include/libmilter/mfapi.h</CODE> for legal values, 54 look for the C macros with the prefix 55 <CODE>SMFIM_</CODE>. 56 Available protocol stages are at least 57 the initial connection, HELO/EHLO, MAIL, RCPT, DATA, 58 end of header, and 59 the end of a message. 60 </TD></TR> 61 62 <TR><TD>macros</TD> 63 <TD>list of macros (separated by space). 64 Example: "{rcpt_mailer} {rcpt_host}" 65 </TD></TR> 66 67 </TABLE> 68</TD></TR> 69 70<!----------- Return values ----------> 71<TR> 72<TH valign="top" align=left>RETURN VALUES</TH> 73 74<TD>MI_FAILURE is returned if 75<UL> 76<LI>there is not enough free memory to make a copy of the macro list, 77<LI><CODE>macros</CODE> is <CODE>NULL</CODE> or empty, 78<LI><CODE>stage</CODE> is not a valid protocol stage, 79<LI>the macro list for 80<CODE>stage</CODE> has been set before. 81</UL> 82Otherwise MI_SUCCESS is returned. 83</TD> 84</TR> 85 86<!----------- Notes ----------> 87<TR align="left" valign=top> 88<TH>NOTES</TH> 89<TD>There is an internal limit on the number of macros 90that can be set 91<!-- XREF: MAXFILTERMACROS --> 92(currently 50), 93however, this limit is not enforced by libmilter, only by the MTA, 94but a possible violation of this restriction is not communicated back to 95the milter.</TD> 96</TR> 97 98</TABLE> 99 100<HR size="1"> 101<FONT size="-1"> 102Copyright (c) 2006, 2012 Proofpoint, Inc. and its suppliers. 103All rights reserved. 104<BR> 105By using this file, you agree to the terms and conditions set 106forth in the LICENSE. 107</FONT> 108</BODY> 109</HTML> 110