smfi_getsymval.html revision 112810
1151497Sru<html>
2104862Sru<head><title>smfi_getsymval</title></head>
3104862Sru<body>
4104862Sru<h1>smfi_getsymval</h1>
5104862Sru
6104862Sru<table border="0" cellspacing=4 cellpadding=4>
7104862Sru<!---------- Synopsis ----------->
8104862Sru<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
9104862Sru<pre>
10104862Sru#include &lt;libmilter/mfapi.h&gt;
11104862Sruchar* smfi_getsymval(
12104862Sru	SMFICTX *ctx,
13104862Sru	char *symname
14151497Sru);
15104862Sru</pre>
16104862SruGet the value of a sendmail macro.
17151497Sru</td></tr>
18104862Sru
19104862Sru<!----------- Description ---------->
20104862Sru<tr><th valign="top" align=left>DESCRIPTION</th><td>
21104862Sru<table border="1" cellspacing=1 cellpadding=4>
22104862Sru<tr align="left" valign=top>
23104862Sru<th width="80">Called When</th>
24104862Sru<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>
25104862Sru</tr>
26104862Sru<tr align="left" valign=top>
27104862Sru<th width="80">Effects</th>
28104862Sru<td>None.</td>
29104862Sru</tr>
30104862Sru</table>
31104862Sru
32104862Sru<!----------- Arguments ---------->
33104862Sru<tr><th valign="top" align=left>ARGUMENTS</th><td>
34104862Sru    <table border="1" cellspacing=0>
35104862Sru    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
36104862Sru    <tr valign="top"><td>ctx</td>
37104862Sru	<td>The opaque context structure.
38104862Sru	</td></tr>
39104862Sru    <tr valign="top"><td>symname</td>
40104862Sru	<td>The name of a sendmail macro.
41104862Sru	Single letter macros can optionally be enclosed in braces ("{" and "}"),
42104862Sru	longer macro names must be enclosed in braces, just as in a
43104862Sru	<tt>sendmail.cf</tt> file.
44104862Sru	<a href="#notes">See below</a> for default macros.
45104862Sru	</td></tr>
46104862Sru    </table>
47104862Sru</td></tr>
48104862Sru
49104862Sru<!----------- Return values ---------->
50104862Sru<tr>
51104862Sru<th valign="top" align=left>RETURN VALUES</th> 
52104862Sru
53104862Sru<td>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</td>
54104862Sru</tr>
55104862Sru
56104862Sru<!----------- Notes ---------->
57104862Sru<tr align="left" valign=top>
58151497Sru<th><a name="notes">NOTES</A></th> 
59104862Sru<td>
60104862SruBy default, the following macros are valid in the given contexts:
61104862Sru
62104862Sru<table border="1" cellspacing=0>
63104862Sru<tr bgcolor="#dddddd"><th>Sent With</th><th>Macros</th></tr>
64104862Sru<tr><td>xxfi_connect</td>    <td>daemon_name, if_name, if_addr, j, _</td></tr>
65151497Sru<tr><td>xxfi_helo</td>       <td>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</td></tr>
66151497Sru<tr><td>xxfi_envfrom</td>    <td>i, auth_type, auth_authen, auth_ssf, auth_author,
67151497Sru                mail_mailer, mail_host, mail_addr</td></tr>
68151497Sru<tr><td>xxfi_envrcpt</td>    <td>rcpt_mailer, rcpt_host, rcpt_addr</td></tr>
69104862Sru</table>
70104862Sru<p>
71104862SruAll macros stay in effect from the point they are received until the
72104862Sruend of the connection for the first two sets, the end of the message
73104862Srufor the third (xxfi_envfrom), and just for each recipient for the
74104862Srufinal set (xxfi_envrcpt).
75104862Sru<p>
76104862SruThe macro list can be changed using the confMILTER_MACROS_* options in
77104862Srusendmail.mc.  The scopes of such macros will be determined by when
78104862Sruthey are set by sendmail.  For descriptions of macros' values, please
79104862Srusee the "Sendmail Installation and Operation Guide" provided with your
80104862Srusendmail distribution.
81104862Sru
82104862Sru</td>
83104862Sru</tr>
84104862Sru
85104862Sru</table>
86104862Sru
87104862Sru<hr size="1">
88104862Sru<font size="-1">
89104862SruCopyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
90104862SruAll rights reserved.
91104862Sru<br>
92104862SruBy using this file, you agree to the terms and conditions set
93151497Sruforth in the LICENSE.
94151497Sru</font>
95104862Sru</body>
96104862Sru</html>
97104862Sru