smfi_setsymlist.html revision 266527
1132718Skan<HTML>
296263Sobrien<HEAD><TITLE>smfi_setsymlist</TITLE></HEAD>
396263Sobrien<BODY>
496263Sobrien<!--
596263Sobrien$Id: smfi_setsymlist.html,v 1.7 2013-11-22 20:51:39 ca Exp $
696263Sobrien-->
796263Sobrien<H1>smfi_setsymlist</H1>
896263Sobrien
996263Sobrien<TABLE border="0" cellspacing=4 cellpadding=4>
1096263Sobrien<!---------- Synopsis ----------->
1196263Sobrien<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
1296263Sobrien<PRE>
1396263Sobrien#include &lt;libmilter/mfapi.h&gt;
1496263Sobrienint smfi_setsymlist(
1596263Sobrien        SMFICTX    *ctx, 
1696263Sobrien	int        stage,
1796263Sobrien	char       *macros
1896263Sobrien);
1996263Sobrien</PRE>
20132718SkanSet the list of macros that the milter wants to receive from the MTA
21132718Skanfor a protocol stage.
22132718Skan</TD></TR>
23132718Skan
2496263Sobrien<!----------- Description ---------->
25132718Skan<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
26132718Skan<TABLE border="1" cellspacing=1 cellpadding=4>
27132718Skan<TR align="left" valign=top>
28132718Skan<TH width="80">Called When</TH>
2996263Sobrien<TD>This function must only be called during
3096263Sobrien<A HREF="xxfi_negotiate.html">xxfi_negotiate()</A>.
3196263Sobrien</TD>
3296263Sobrien</TR>
3396263Sobrien<TR align="left" valign=top>
3496263Sobrien<TH width="80">Effects</TH>
3596263Sobrien<TD>This function can be used to override the list of macros that the
3696263Sobrienmilter wants to receive from the MTA.
3796263Sobrien</TD>
3896263Sobrien</TR>
3996263Sobrien</TABLE>
4096263Sobrien
4196263Sobrien<!----------- Arguments ---------->
4296263Sobrien<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
4396263Sobrien    <TABLE border="1" cellspacing=0>
4496263Sobrien    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
4596263Sobrien
4696263Sobrien    <TR><TD>ctx</TD>
47119256Skan	<TD>the opaque context structure.
48119256Skan	</TD></TR>
49119256Skan
50119256Skan    <TR><TD>stage</TD>
51119256Skan	<TD>the protocol stage during which the macro list should be used.
5296263Sobrien	See the file
5396263Sobrien	<CODE>include/libmilter/mfapi.h</CODE> for legal values,
5496263Sobrien	look for the C macros with the prefix
5596263Sobrien	<CODE>SMFIM_</CODE>.
5696263Sobrien	Available protocol stages are at least
5796263Sobrien	the initial connection, HELO/EHLO, MAIL, RCPT, DATA,
5896263Sobrien	end of header, and
5996263Sobrien	the end of a message.
6096263Sobrien	</TD></TR>
61117395Skan
62117395Skan    <TR><TD>macros</TD>
63117395Skan	<TD>list of macros (separated by space).
64117395Skan	Example: "{rcpt_mailer} {rcpt_host}"
6596263Sobrien	</TD></TR>
6696263Sobrien
6796263Sobrien    </TABLE>
68117395Skan</TD></TR>
6996263Sobrien
7096263Sobrien<!----------- Return values ---------->
7196263Sobrien<TR>
7296263Sobrien<TH valign="top" align=left>RETURN VALUES</TH> 
7396263Sobrien
7496263Sobrien<TD>MI_FAILURE is returned if
7596263Sobrien<UL>
7696263Sobrien<LI>there is not enough free memory to make a copy of the macro list,
7796263Sobrien<LI><CODE>macros</CODE> is <CODE>NULL</CODE> or empty,
7896263Sobrien<LI><CODE>stage</CODE> is not a valid protocol stage,
79132718Skan<LI>the macro list for
80132718Skan<CODE>stage</CODE> has been set before.
81132718Skan</UL>
82132718SkanOtherwise MI_SUCCESS is returned.
83132718Skan</TD>
84132718Skan</TR>
8596263Sobrien
8696263Sobrien<!----------- Notes ---------->
8796263Sobrien<TR align="left" valign=top>
8896263Sobrien<TH>NOTES</TH> 
8996263Sobrien<TD>There is an internal limit on the number of macros
9096263Sobrienthat can be set
9196263Sobrien<!-- XREF: MAXFILTERMACROS -->
9296263Sobrien(currently 50),
9396263Sobrienhowever, this limit is not enforced by libmilter, only by the MTA,
9496263Sobrienbut a possible violation of this restriction is not communicated back to
9596263Sobrienthe milter.</TD>
96132718Skan</TR>
97132718Skan
98132718Skan</TABLE>
99132718Skan
100132718Skan<HR size="1">
101132718Skan<FONT size="-1">
10296263SobrienCopyright (c) 2006, 2012 Proofpoint, Inc. and its suppliers.
103132718SkanAll rights reserved.
104132718Skan<BR>
105132718SkanBy using this file, you agree to the terms and conditions set
106132718Skanforth in the LICENSE.
107132718Skan</FONT>
10896263Sobrien</BODY>
10996263Sobrien</HTML>
11096263Sobrien