1168515Sgshapiro<HTML>
2168515Sgshapiro<HEAD><TITLE>smfi_setsymlist</TITLE></HEAD>
3168515Sgshapiro<BODY>
4168515Sgshapiro<!--
5266527Sgshapiro$Id: smfi_setsymlist.html,v 1.7 2013-11-22 20:51:39 ca Exp $
6168515Sgshapiro-->
7168515Sgshapiro<H1>smfi_setsymlist</H1>
8168515Sgshapiro
9168515Sgshapiro<TABLE border="0" cellspacing=4 cellpadding=4>
10168515Sgshapiro<!---------- Synopsis ----------->
11168515Sgshapiro<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12168515Sgshapiro<PRE>
13168515Sgshapiro#include &lt;libmilter/mfapi.h&gt;
14168515Sgshapiroint smfi_setsymlist(
15168515Sgshapiro        SMFICTX    *ctx, 
16168515Sgshapiro	int        stage,
17168515Sgshapiro	char       *macros
18168515Sgshapiro);
19168515Sgshapiro</PRE>
20168515SgshapiroSet the list of macros that the milter wants to receive from the MTA
21168515Sgshapirofor a protocol stage.
22168515Sgshapiro</TD></TR>
23168515Sgshapiro
24168515Sgshapiro<!----------- Description ---------->
25168515Sgshapiro<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
26168515Sgshapiro<TABLE border="1" cellspacing=1 cellpadding=4>
27168515Sgshapiro<TR align="left" valign=top>
28168515Sgshapiro<TH width="80">Called When</TH>
29168515Sgshapiro<TD>This function must only be called during
30168515Sgshapiro<A HREF="xxfi_negotiate.html">xxfi_negotiate()</A>.
31168515Sgshapiro</TD>
32168515Sgshapiro</TR>
33168515Sgshapiro<TR align="left" valign=top>
34168515Sgshapiro<TH width="80">Effects</TH>
35168515Sgshapiro<TD>This function can be used to override the list of macros that the
36168515Sgshapiromilter wants to receive from the MTA.
37168515Sgshapiro</TD>
38168515Sgshapiro</TR>
39168515Sgshapiro</TABLE>
40168515Sgshapiro
41168515Sgshapiro<!----------- Arguments ---------->
42168515Sgshapiro<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
43168515Sgshapiro    <TABLE border="1" cellspacing=0>
44168515Sgshapiro    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
45168515Sgshapiro
46168515Sgshapiro    <TR><TD>ctx</TD>
47168515Sgshapiro	<TD>the opaque context structure.
48168515Sgshapiro	</TD></TR>
49168515Sgshapiro
50168515Sgshapiro    <TR><TD>stage</TD>
51168515Sgshapiro	<TD>the protocol stage during which the macro list should be used.
52168515Sgshapiro	See the file
53168515Sgshapiro	<CODE>include/libmilter/mfapi.h</CODE> for legal values,
54168515Sgshapiro	look for the C macros with the prefix
55168515Sgshapiro	<CODE>SMFIM_</CODE>.
56168515Sgshapiro	Available protocol stages are at least
57168515Sgshapiro	the initial connection, HELO/EHLO, MAIL, RCPT, DATA,
58168515Sgshapiro	end of header, and
59168515Sgshapiro	the end of a message.
60168515Sgshapiro	</TD></TR>
61168515Sgshapiro
62168515Sgshapiro    <TR><TD>macros</TD>
63168515Sgshapiro	<TD>list of macros (separated by space).
64168515Sgshapiro	Example: "{rcpt_mailer} {rcpt_host}"
65285229Sgshapiro	<BR>
66285229Sgshapiro	An empty string ("", not NULL) can be used to specify that no macros
67285229Sgshapiro	should be sent.
68168515Sgshapiro	</TD></TR>
69168515Sgshapiro
70168515Sgshapiro    </TABLE>
71168515Sgshapiro</TD></TR>
72168515Sgshapiro
73168515Sgshapiro<!----------- Return values ---------->
74168515Sgshapiro<TR>
75168515Sgshapiro<TH valign="top" align=left>RETURN VALUES</TH> 
76168515Sgshapiro
77168515Sgshapiro<TD>MI_FAILURE is returned if
78168515Sgshapiro<UL>
79168515Sgshapiro<LI>there is not enough free memory to make a copy of the macro list,
80285229Sgshapiro<LI><CODE>macros</CODE> is <CODE>NULL</CODE>,
81168515Sgshapiro<LI><CODE>stage</CODE> is not a valid protocol stage,
82168515Sgshapiro<LI>the macro list for
83168515Sgshapiro<CODE>stage</CODE> has been set before.
84168515Sgshapiro</UL>
85168515SgshapiroOtherwise MI_SUCCESS is returned.
86168515Sgshapiro</TD>
87168515Sgshapiro</TR>
88168515Sgshapiro
89168515Sgshapiro<!----------- Notes ---------->
90168515Sgshapiro<TR align="left" valign=top>
91168515Sgshapiro<TH>NOTES</TH> 
92244833Sgshapiro<TD>There is an internal limit on the number of macros
93244833Sgshapirothat can be set
94244833Sgshapiro<!-- XREF: MAXFILTERMACROS -->
95244833Sgshapiro(currently 50),
96168515Sgshapirohowever, this limit is not enforced by libmilter, only by the MTA,
97168515Sgshapirobut a possible violation of this restriction is not communicated back to
98168515Sgshapirothe milter.</TD>
99168515Sgshapiro</TR>
100168515Sgshapiro
101168515Sgshapiro</TABLE>
102168515Sgshapiro
103168515Sgshapiro<HR size="1">
104168515Sgshapiro<FONT size="-1">
105261194SgshapiroCopyright (c) 2006, 2012 Proofpoint, Inc. and its suppliers.
106168515SgshapiroAll rights reserved.
107168515Sgshapiro<BR>
108168515SgshapiroBy using this file, you agree to the terms and conditions set
109168515Sgshapiroforth in the LICENSE.
110168515Sgshapiro</FONT>
111168515Sgshapiro</BODY>
112168515Sgshapiro</HTML>
113