smfi_getsymval.html revision 266692
1<HTML>
2<HEAD><TITLE>smfi_getsymval</TITLE></HEAD>
3<BODY>
4<!--
5$Id: smfi_getsymval.html,v 1.16 2013-11-22 20:51:39 ca Exp $
6-->
7<H1>smfi_getsymval</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;
14char* smfi_getsymval(
15	SMFICTX *ctx,
16	char *symname
17);
18</PRE>
19Get the value of a sendmail macro.
20</TD></TR>
21
22<!----------- Description ---------->
23<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
24<TABLE border="1" cellspacing=1 cellpadding=4>
25<TR align="left" valign=top>
26<TH width="80">Called When</TH>
27<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>
28</TR>
29<TR align="left" valign=top>
30<TH width="80">Effects</TH>
31<TD>None.</TD>
32</TR>
33</TABLE>
34
35<!----------- Arguments ---------->
36<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37    <TABLE border="1" cellspacing=0>
38    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39    <TR valign="top"><TD>ctx</TD>
40	<TD>The opaque context structure.
41	</TD></TR>
42    <TR valign="top"><TD>symname</TD>
43	<TD>The name of a sendmail macro.
44	Single letter macros can optionally be enclosed in braces ("{" and "}"),
45	longer macro names must be enclosed in braces, just as in a
46	<TT>sendmail.cf</TT> file.
47	<A href="#notes">See below</A> for default macros.
48	</TD></TR>
49    </TABLE>
50</TD></TR>
51
52<!----------- Return values ---------->
53<TR>
54<TH valign="top" align=left>RETURN VALUES</TH> 
55
56<TD>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</TD>
57</TR>
58
59<!----------- Notes ---------->
60<TR align="left" valign=top>
61<TH><A name="notes">NOTES</A></TH> 
62<TD>
63By default, the following macros are valid in the given contexts:
64
65<TABLE border="1" cellspacing=0>
66<TR bgcolor="#dddddd"><TH>Sent With</TH><TH>Macros</TH></TR>
67<TR><TD>xxfi_connect</TD>    <TD>daemon_name, if_name, if_addr, j, _</TD></TR>
68<TR><TD>xxfi_helo</TD>       <TD>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</TD></TR>
69<TR><TD>xxfi_envfrom</TD>    <TD>i, auth_type, auth_authen, auth_ssf, auth_author,
70                mail_mailer, mail_host, mail_addr</TD></TR>
71<TR><TD>xxfi_envrcpt</TD>    <TD>rcpt_mailer, rcpt_host, rcpt_addr</TD></TR>
72
73<TR><TD>xxfi_data</TD>   <TD>(none)</TD></TR>
74<TR><TD>xxfi_eoh</TD>    <TD>(none)</TD></TR>
75<TR><TD>xxfi_eom</TD>    <TD>msg_id</TD></TR>
76</TABLE>
77<P>
78All macros stay in effect from the point they are received
79until the end of the connection for the first two sets,
80the end of the message for the third (xxfi_envfrom) and last (xxfi_eom),
81and just for each recipient for xxfi_envrcpt.
82<P>
83The macro list can be changed using the confMILTER_MACROS_* options in
84sendmail.mc.
85The scopes of such macros will be determined by when they are set by sendmail.
86For descriptions of macros' values,
87please see the
88"Sendmail Installation and Operation Guide"
89provided with your sendmail distribution.
90
91</TD>
92</TR>
93
94</TABLE>
95
96<HR size="1">
97<FONT size="-1">
98Copyright (c) 2000, 2002-2003, 2007 Proofpoint, Inc. and its suppliers.
99All rights reserved.
100<BR>
101By using this file, you agree to the terms and conditions set
102forth in the LICENSE.
103</FONT>
104</BODY>
105</HTML>
106