1139825Simp<HTML>
2116965Sgrehan<HEAD><TITLE>smfi_setsymlist</TITLE></HEAD>
3116965Sgrehan<BODY>
4116965Sgrehan<!--
5116965Sgrehan$Id: smfi_setsymlist.html,v 1.6 2012/05/11 17:34:23 ca Exp $
6116965Sgrehan-->
7116965Sgrehan<H1>smfi_setsymlist</H1>
8116965Sgrehan
9116965Sgrehan<TABLE border="0" cellspacing=4 cellpadding=4>
10116965Sgrehan<!---------- Synopsis ----------->
11116965Sgrehan<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12116965Sgrehan<PRE>
13116965Sgrehan#include &lt;libmilter/mfapi.h&gt;
14116965Sgrehanint smfi_setsymlist(
15116965Sgrehan        SMFICTX    *ctx, 
16116965Sgrehan	int        stage,
17116965Sgrehan	char       *macros
18116965Sgrehan);
19116965Sgrehan</PRE>
20116965SgrehanSet the list of macros that the milter wants to receive from the MTA
21116965Sgrehanfor a protocol stage.
22116965Sgrehan</TD></TR>
23116965Sgrehan
24116965Sgrehan<!----------- Description ---------->
25116965Sgrehan<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
26116965Sgrehan<TABLE border="1" cellspacing=1 cellpadding=4>
27116965Sgrehan<TR align="left" valign=top>
28116965Sgrehan<TH width="80">Called When</TH>
29116965Sgrehan<TD>This function must only be called during
30116965Sgrehan<A HREF="xxfi_negotiate.html">xxfi_negotiate()</A>.
31116965Sgrehan</TD>
32116965Sgrehan</TR>
33116965Sgrehan<TR align="left" valign=top>
34116965Sgrehan<TH width="80">Effects</TH>
35116965Sgrehan<TD>This function can be used to override the list of macros that the
36116965Sgrehanmilter wants to receive from the MTA.
37116965Sgrehan</TD>
38116965Sgrehan</TR>
39116965Sgrehan</TABLE>
40116965Sgrehan
41116965Sgrehan<!----------- Arguments ---------->
42116965Sgrehan<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
43116965Sgrehan    <TABLE border="1" cellspacing=0>
44116965Sgrehan    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
45116965Sgrehan
46116965Sgrehan    <TR><TD>ctx</TD>
47116965Sgrehan	<TD>the opaque context structure.
48116965Sgrehan	</TD></TR>
49116965Sgrehan
50116965Sgrehan    <TR><TD>stage</TD>
51116965Sgrehan	<TD>the protocol stage during which the macro list should be used.
52116965Sgrehan	See the file
53116965Sgrehan	<CODE>include/libmilter/mfapi.h</CODE> for legal values,
54116965Sgrehan	look for the C macros with the prefix
55116965Sgrehan	<CODE>SMFIM_</CODE>.
56116965Sgrehan	Available protocol stages are at least
57116965Sgrehan	the initial connection, HELO/EHLO, MAIL, RCPT, DATA,
58116965Sgrehan	end of header, and
59116965Sgrehan	the end of a message.
60116965Sgrehan	</TD></TR>
61116965Sgrehan
62116965Sgrehan    <TR><TD>macros</TD>
63116965Sgrehan	<TD>list of macros (separated by space).
64116965Sgrehan	Example: "{rcpt_mailer} {rcpt_host}"
65116965Sgrehan	</TD></TR>
66116965Sgrehan
67116965Sgrehan    </TABLE>
68116965Sgrehan</TD></TR>
69116965Sgrehan
70116965Sgrehan<!----------- Return values ---------->
71116965Sgrehan<TR>
72116965Sgrehan<TH valign="top" align=left>RETURN VALUES</TH> 
73116965Sgrehan
74116965Sgrehan<TD>MI_FAILURE is returned if
75116965Sgrehan<UL>
76116965Sgrehan<LI>there is not enough free memory to make a copy of the macro list,
77116965Sgrehan<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 Sendmail, 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