1168515Sgshapiro<HTML>
2168515Sgshapiro<HEAD><TITLE>smfi_getsymval</TITLE></HEAD>
3168515Sgshapiro<BODY>
4132943Sgshapiro<!--
5266711Sgshapiro$Id: smfi_getsymval.html,v 1.16 2013-11-22 20:51:39 ca Exp $
6132943Sgshapiro-->
7168515Sgshapiro<H1>smfi_getsymval</H1>
890792Sgshapiro
9168515Sgshapiro<TABLE border="0" cellspacing=4 cellpadding=4>
1090792Sgshapiro<!---------- Synopsis ----------->
11168515Sgshapiro<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12168515Sgshapiro<PRE>
1390792Sgshapiro#include &lt;libmilter/mfapi.h&gt;
1490792Sgshapirochar* smfi_getsymval(
1590792Sgshapiro	SMFICTX *ctx,
1690792Sgshapiro	char *symname
1790792Sgshapiro);
18168515Sgshapiro</PRE>
1990792SgshapiroGet the value of a sendmail macro.
20168515Sgshapiro</TD></TR>
2190792Sgshapiro
2290792Sgshapiro<!----------- Description ---------->
23168515Sgshapiro<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
24168515Sgshapiro<TABLE border="1" cellspacing=1 cellpadding=4>
25168515Sgshapiro<TR align="left" valign=top>
26168515Sgshapiro<TH width="80">Called When</TH>
27168515Sgshapiro<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>
28168515Sgshapiro</TR>
29168515Sgshapiro<TR align="left" valign=top>
30168515Sgshapiro<TH width="80">Effects</TH>
31168515Sgshapiro<TD>None.</TD>
32168515Sgshapiro</TR>
33168515Sgshapiro</TABLE>
3490792Sgshapiro
3590792Sgshapiro<!----------- Arguments ---------->
36168515Sgshapiro<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37168515Sgshapiro    <TABLE border="1" cellspacing=0>
38168515Sgshapiro    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39168515Sgshapiro    <TR valign="top"><TD>ctx</TD>
40168515Sgshapiro	<TD>The opaque context structure.
41168515Sgshapiro	</TD></TR>
42168515Sgshapiro    <TR valign="top"><TD>symname</TD>
43168515Sgshapiro	<TD>The name of a sendmail macro.
4498841Sgshapiro	Single letter macros can optionally be enclosed in braces ("{" and "}"),
4598841Sgshapiro	longer macro names must be enclosed in braces, just as in a
46168515Sgshapiro	<TT>sendmail.cf</TT> file.
47168515Sgshapiro	<A href="#notes">See below</A> for default macros.
48168515Sgshapiro	</TD></TR>
49168515Sgshapiro    </TABLE>
50168515Sgshapiro</TD></TR>
5190792Sgshapiro
5290792Sgshapiro<!----------- Return values ---------->
53168515Sgshapiro<TR>
54168515Sgshapiro<TH valign="top" align=left>RETURN VALUES</TH> 
5590792Sgshapiro
56168515Sgshapiro<TD>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</TD>
57168515Sgshapiro</TR>
5890792Sgshapiro
5990792Sgshapiro<!----------- Notes ---------->
60168515Sgshapiro<TR align="left" valign=top>
61168515Sgshapiro<TH><A name="notes">NOTES</A></TH> 
62168515Sgshapiro<TD>
6390792SgshapiroBy default, the following macros are valid in the given contexts:
6490792Sgshapiro
65168515Sgshapiro<TABLE border="1" cellspacing=0>
66168515Sgshapiro<TR bgcolor="#dddddd"><TH>Sent With</TH><TH>Macros</TH></TR>
67168515Sgshapiro<TR><TD>xxfi_connect</TD>    <TD>daemon_name, if_name, if_addr, j, _</TD></TR>
68168515Sgshapiro<TR><TD>xxfi_helo</TD>       <TD>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</TD></TR>
69168515Sgshapiro<TR><TD>xxfi_envfrom</TD>    <TD>i, auth_type, auth_authen, auth_ssf, auth_author,
70168515Sgshapiro                mail_mailer, mail_host, mail_addr</TD></TR>
71168515Sgshapiro<TR><TD>xxfi_envrcpt</TD>    <TD>rcpt_mailer, rcpt_host, rcpt_addr</TD></TR>
72168515Sgshapiro
73168515Sgshapiro<TR><TD>xxfi_data</TD>   <TD>(none)</TD></TR>
74168515Sgshapiro<TR><TD>xxfi_eoh</TD>    <TD>(none)</TD></TR>
75168515Sgshapiro<TR><TD>xxfi_eom</TD>    <TD>msg_id</TD></TR>
76168515Sgshapiro</TABLE>
77168515Sgshapiro<P>
78168515SgshapiroAll macros stay in effect from the point they are received
79168515Sgshapirountil the end of the connection for the first two sets,
80168515Sgshapirothe end of the message for the third (xxfi_envfrom) and last (xxfi_eom),
81168515Sgshapiroand just for each recipient for xxfi_envrcpt.
82168515Sgshapiro<P>
8390792SgshapiroThe macro list can be changed using the confMILTER_MACROS_* options in
84168515Sgshapirosendmail.mc.
85168515SgshapiroThe scopes of such macros will be determined by when they are set by sendmail.
86168515SgshapiroFor descriptions of macros' values,
87168515Sgshapiroplease see the
88168515Sgshapiro"Sendmail Installation and Operation Guide"
89168515Sgshapiroprovided with your sendmail distribution.
9090792Sgshapiro
91168515Sgshapiro</TD>
92168515Sgshapiro</TR>
9390792Sgshapiro
94168515Sgshapiro</TABLE>
9590792Sgshapiro
96168515Sgshapiro<HR size="1">
97168515Sgshapiro<FONT size="-1">
98261370SgshapiroCopyright (c) 2000, 2002-2003, 2007 Proofpoint, Inc. and its suppliers.
9990792SgshapiroAll rights reserved.
100168515Sgshapiro<BR>
10190792SgshapiroBy using this file, you agree to the terms and conditions set
102112810Sgshapiroforth in the LICENSE.
103168515Sgshapiro</FONT>
104168515Sgshapiro</BODY>
105168515Sgshapiro</HTML>
106