xref: /freebsd/contrib/sendmail/libmilter/docs/smfi_getsymval.html (revision e92d3f3ffe83a6ed7eaafac70da9cf4fafe13243)
140266059SGregory Neil Shapiro<html>
240266059SGregory Neil Shapiro<head><title>smfi_getsymval</title></head>
340266059SGregory Neil Shapiro<body>
4e92d3f3fSGregory Neil Shapiro<!--
5e92d3f3fSGregory Neil Shapiro$Id: smfi_getsymval.html,v 1.10 2003/03/05 19:57:54 ca Exp $
6e92d3f3fSGregory Neil Shapiro-->
740266059SGregory Neil Shapiro<h1>smfi_getsymval</h1>
840266059SGregory Neil Shapiro
940266059SGregory Neil Shapiro<table border="0" cellspacing=4 cellpadding=4>
1040266059SGregory Neil Shapiro<!---------- Synopsis ----------->
1140266059SGregory Neil Shapiro<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
1240266059SGregory Neil Shapiro<pre>
1340266059SGregory Neil Shapiro#include &lt;libmilter/mfapi.h&gt;
1440266059SGregory Neil Shapirochar* smfi_getsymval(
1540266059SGregory Neil Shapiro	SMFICTX *ctx,
1640266059SGregory Neil Shapiro	char *symname
1740266059SGregory Neil Shapiro);
1840266059SGregory Neil Shapiro</pre>
1940266059SGregory Neil ShapiroGet the value of a sendmail macro.
2040266059SGregory Neil Shapiro</td></tr>
2140266059SGregory Neil Shapiro
2240266059SGregory Neil Shapiro<!----------- Description ---------->
2340266059SGregory Neil Shapiro<tr><th valign="top" align=left>DESCRIPTION</th><td>
2440266059SGregory Neil Shapiro<table border="1" cellspacing=1 cellpadding=4>
2540266059SGregory Neil Shapiro<tr align="left" valign=top>
2640266059SGregory Neil Shapiro<th width="80">Called When</th>
2740266059SGregory Neil Shapiro<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>
2840266059SGregory Neil Shapiro</tr>
2940266059SGregory Neil Shapiro<tr align="left" valign=top>
3040266059SGregory Neil Shapiro<th width="80">Effects</th>
3140266059SGregory Neil Shapiro<td>None.</td>
3240266059SGregory Neil Shapiro</tr>
3340266059SGregory Neil Shapiro</table>
3440266059SGregory Neil Shapiro
3540266059SGregory Neil Shapiro<!----------- Arguments ---------->
3640266059SGregory Neil Shapiro<tr><th valign="top" align=left>ARGUMENTS</th><td>
3740266059SGregory Neil Shapiro    <table border="1" cellspacing=0>
3840266059SGregory Neil Shapiro    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
3940266059SGregory Neil Shapiro    <tr valign="top"><td>ctx</td>
4040266059SGregory Neil Shapiro	<td>The opaque context structure.
4140266059SGregory Neil Shapiro	</td></tr>
4240266059SGregory Neil Shapiro    <tr valign="top"><td>symname</td>
43739ac4d4SGregory Neil Shapiro	<td>The name of a sendmail macro.
44739ac4d4SGregory Neil Shapiro	Single letter macros can optionally be enclosed in braces ("{" and "}"),
45739ac4d4SGregory Neil Shapiro	longer macro names must be enclosed in braces, just as in a
46739ac4d4SGregory Neil Shapiro	<tt>sendmail.cf</tt> file.
47739ac4d4SGregory Neil Shapiro	<a href="#notes">See below</a> for default macros.
4840266059SGregory Neil Shapiro	</td></tr>
4940266059SGregory Neil Shapiro    </table>
5040266059SGregory Neil Shapiro</td></tr>
5140266059SGregory Neil Shapiro
5240266059SGregory Neil Shapiro<!----------- Return values ---------->
5340266059SGregory Neil Shapiro<tr>
5440266059SGregory Neil Shapiro<th valign="top" align=left>RETURN VALUES</th>
5540266059SGregory Neil Shapiro
5640266059SGregory Neil Shapiro<td>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</td>
5740266059SGregory Neil Shapiro</tr>
5840266059SGregory Neil Shapiro
5940266059SGregory Neil Shapiro<!----------- Notes ---------->
6040266059SGregory Neil Shapiro<tr align="left" valign=top>
6140266059SGregory Neil Shapiro<th><a name="notes">NOTES</A></th>
6240266059SGregory Neil Shapiro<td>
6340266059SGregory Neil ShapiroBy default, the following macros are valid in the given contexts:
6440266059SGregory Neil Shapiro
6540266059SGregory Neil Shapiro<table border="1" cellspacing=0>
6640266059SGregory Neil Shapiro<tr bgcolor="#dddddd"><th>Sent With</th><th>Macros</th></tr>
6740266059SGregory Neil Shapiro<tr><td>xxfi_connect</td>    <td>daemon_name, if_name, if_addr, j, _</td></tr>
6840266059SGregory Neil Shapiro<tr><td>xxfi_helo</td>       <td>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</td></tr>
6940266059SGregory Neil Shapiro<tr><td>xxfi_envfrom</td>    <td>i, auth_type, auth_authen, auth_ssf, auth_author,
7040266059SGregory Neil Shapiro                mail_mailer, mail_host, mail_addr</td></tr>
7140266059SGregory Neil Shapiro<tr><td>xxfi_envrcpt</td>    <td>rcpt_mailer, rcpt_host, rcpt_addr</td></tr>
7240266059SGregory Neil Shapiro</table>
7340266059SGregory Neil Shapiro<p>
7440266059SGregory Neil ShapiroAll macros stay in effect from the point they are received until the
7540266059SGregory Neil Shapiroend of the connection for the first two sets, the end of the message
7640266059SGregory Neil Shapirofor the third (xxfi_envfrom), and just for each recipient for the
7740266059SGregory Neil Shapirofinal set (xxfi_envrcpt).
7840266059SGregory Neil Shapiro<p>
7940266059SGregory Neil ShapiroThe macro list can be changed using the confMILTER_MACROS_* options in
8040266059SGregory Neil Shapirosendmail.mc.  The scopes of such macros will be determined by when
8140266059SGregory Neil Shapirothey are set by sendmail.  For descriptions of macros' values, please
8240266059SGregory Neil Shapirosee the "Sendmail Installation and Operation Guide" provided with your
8340266059SGregory Neil Shapirosendmail distribution.
8440266059SGregory Neil Shapiro
8540266059SGregory Neil Shapiro</td>
8640266059SGregory Neil Shapiro</tr>
8740266059SGregory Neil Shapiro
8840266059SGregory Neil Shapiro</table>
8940266059SGregory Neil Shapiro
9040266059SGregory Neil Shapiro<hr size="1">
9140266059SGregory Neil Shapiro<font size="-1">
925ef517c0SGregory Neil ShapiroCopyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
9340266059SGregory Neil ShapiroAll rights reserved.
9440266059SGregory Neil Shapiro<br>
9540266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set
965ef517c0SGregory Neil Shapiroforth in the LICENSE.
9740266059SGregory Neil Shapiro</font>
9840266059SGregory Neil Shapiro</body>
9940266059SGregory Neil Shapiro</html>
100