xref: /freebsd/contrib/sendmail/libmilter/docs/smfi_setsymlist.html (revision e2c0e292e8a7ca00ba99bcfccc9e637f45c3e8b1)
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 &lt;libmilter/mfapi.h&gt;
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</TD></TR>
41
42<!----------- Arguments ---------->
43<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
44    <TABLE border="1" cellspacing=0>
45    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
46
47    <TR><TD>ctx</TD>
48	<TD>the opaque context structure.
49	</TD></TR>
50
51    <TR><TD>stage</TD>
52	<TD>the protocol stage during which the macro list should be used.
53	See the file
54	<CODE>include/libmilter/mfapi.h</CODE> for legal values,
55	look for the C macros with the prefix
56	<CODE>SMFIM_</CODE>.
57	Available protocol stages are at least
58	the initial connection, HELO/EHLO, MAIL, RCPT, DATA,
59	end of header, and
60	the end of a message.
61	</TD></TR>
62
63    <TR><TD>macros</TD>
64	<TD>list of macros (separated by space).
65	Example: "{rcpt_mailer} {rcpt_host}"
66	<BR>
67	An empty string ("", not NULL) can be used to specify that no macros
68	should be sent.
69	</TD></TR>
70
71    </TABLE>
72</TD></TR>
73
74<!----------- Return values ---------->
75<TR>
76<TH valign="top" align=left>RETURN VALUES</TH>
77
78<TD>MI_FAILURE is returned if
79<UL>
80<LI>there is not enough free memory to make a copy of the macro list,
81<LI><CODE>macros</CODE> is <CODE>NULL</CODE>,
82<LI><CODE>stage</CODE> is not a valid protocol stage,
83<LI>the macro list for
84<CODE>stage</CODE> has been set before.
85</UL>
86Otherwise MI_SUCCESS is returned.
87</TD>
88</TR>
89
90<!----------- Notes ---------->
91<TR align="left" valign=top>
92<TH>NOTES</TH>
93<TD>There is an internal limit on the number of macros
94that can be set
95<!-- XREF: MAXFILTERMACROS -->
96(currently 50),
97however, this limit is not enforced by libmilter, only by the MTA,
98but a possible violation of this restriction is not communicated back to
99the milter.</TD>
100</TR>
101
102</TABLE>
103
104<HR size="1">
105<FONT size="-1">
106Copyright (c) 2006, 2012 Proofpoint, Inc. and its suppliers.
107All rights reserved.
108<BR>
109By using this file, you agree to the terms and conditions set
110forth in the LICENSE.
111</FONT>
112</BODY>
113</HTML>
114