smfi_getsymval.html revision 261363
134689Sbde<HTML>
250476Speter<HEAD><TITLE>smfi_getsymval</TITLE></HEAD>
31573Srgrimes<BODY>
4156813Sru<!--
5156813Sru$Id: smfi_getsymval.html,v 1.16 2013/11/22 20:51:39 ca Exp $
634689Sbde-->
734689Sbde<H1>smfi_getsymval</H1>
834689Sbde
938752Sbde<TABLE border="0" cellspacing=4 cellpadding=4>
10173017Sru<!---------- Synopsis ----------->
11228989Srwatson<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12204738Simp<PRE>
13204738Simp#include &lt;libmilter/mfapi.h&gt;
1481133Stmmchar* smfi_getsymval(
1559897Sjoe	SMFICTX *ctx,
1679471Smarkm	char *symname
17166131Srafan);
18122568Sharti</PRE>
1959353SkrisGet the value of a sendmail macro.
2041257Sjdp</TD></TR>
2182355Smarkm
2294690Sdes<!----------- Description ---------->
2341257Sjdp<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
2456081Sbde<TABLE border="1" cellspacing=1 cellpadding=4>
2594690Sdes<TR align="left" valign=top>
26181344Sdfr<TH width="80">Called When</TH>
2734689Sbde<TD>smfi_getsymval may be called from within any of the xxfi_* callbacks.  Which macros are defined will depend on when it is called.</TD>
2834689Sbde</TR>
29204738Simp<TR align="left" valign=top>
30204738Simp<TH width="80">Effects</TH>
3134689Sbde<TD>None.</TD>
32205113Simp</TR>
33205113Simp</TABLE>
34205113Simp
35205113Simp<!----------- Arguments ---------->
36215127Sed<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37205113Simp    <TABLE border="1" cellspacing=0>
38205113Simp    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39219019Sgabor    <TR valign="top"><TD>ctx</TD>
40205113Simp	<TD>The opaque context structure.
41205113Simp	</TD></TR>
42205113Simp    <TR valign="top"><TD>symname</TD>
43205113Simp	<TD>The name of a sendmail macro.
44205113Simp	Single letter macros can optionally be enclosed in braces ("{" and "}"),
45205113Simp	longer macro names must be enclosed in braces, just as in a
46205113Simp	<TT>sendmail.cf</TT> file.
47205113Simp	<A href="#notes">See below</A> for default macros.
48205113Simp	</TD></TR>
49205113Simp    </TABLE>
50227987Sdim</TD></TR>
51227987Sdim
52227987Sdim<!----------- Return values ---------->
53205113Simp<TR>
54233337Sstas<TH valign="top" align=left>RETURN VALUES</TH> 
55233337Sstas
56233337Sstas<TD>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</TD>
57233337Sstas</TR>
58205113Simp
59205113Simp<!----------- Notes ---------->
60205113Simp<TR align="left" valign=top>
61205113Simp<TH><A name="notes">NOTES</A></TH> 
62205113Simp<TD>
63215127SedBy default, the following macros are valid in the given contexts:
64205113Simp
65205113Simp<TABLE border="1" cellspacing=0>
66205113Simp<TR bgcolor="#dddddd"><TH>Sent With</TH><TH>Macros</TH></TR>
67205113Simp<TR><TD>xxfi_connect</TD>    <TD>daemon_name, if_name, if_addr, j, _</TD></TR>
68205113Simp<TR><TD>xxfi_helo</TD>       <TD>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</TD></TR>
69205113Simp<TR><TD>xxfi_envfrom</TD>    <TD>i, auth_type, auth_authen, auth_ssf, auth_author,
70205113Simp                mail_mailer, mail_host, mail_addr</TD></TR>
71205113Simp<TR><TD>xxfi_envrcpt</TD>    <TD>rcpt_mailer, rcpt_host, rcpt_addr</TD></TR>
72205113Simp
73205113Simp<TR><TD>xxfi_data</TD>   <TD>(none)</TD></TR>
74205113Simp<TR><TD>xxfi_eoh</TD>    <TD>(none)</TD></TR>
75205113Simp<TR><TD>xxfi_eom</TD>    <TD>msg_id</TD></TR>
76205113Simp</TABLE>
77205113Simp<P>
78205113SimpAll macros stay in effect from the point they are received
79205113Simpuntil the end of the connection for the first two sets,
80205113Simpthe end of the message for the third (xxfi_envfrom) and last (xxfi_eom),
81205113Simpand just for each recipient for xxfi_envrcpt.
82205113Simp<P>
83205113SimpThe macro list can be changed using the confMILTER_MACROS_* options in
84205113Simpsendmail.mc.
85205113SimpThe scopes of such macros will be determined by when they are set by sendmail.
86207842SmmFor descriptions of macros' values,
87205113Simpplease see the
88241774Suqs"Sendmail Installation and Operation Guide"
89205113Simpprovided with your sendmail distribution.
90205113Simp
91205113Simp</TD>
92235537Sgber</TR>
93205113Simp
94205113Simp</TABLE>
95205113Simp
96205113Simp<HR size="1">
97205113Simp<FONT size="-1">
98210682SrpauloCopyright (c) 2000, 2002-2003, 2007 Proofpoint, Inc. and its suppliers.
99221807SstasAll rights reserved.
100205113Simp<BR>
101210690SrpauloBy using this file, you agree to the terms and conditions set
102205113Simpforth in the LICENSE.
103205113Simp</FONT>
104205113Simp</BODY>
105205113Simp</HTML>
106205113Simp